Skip to content

Generate Executable Binary of your node projects for linux. (My changes for Linux Only).

License

Notifications You must be signed in to change notification settings

trindadedev13/lnpkg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 lnpkg

lnpkg is a tiny linux utility that packages a Node.js application into a linux executable.

🚀 Features

  • Automatically wraps your Node.js script into a standalone executable
  • Includes the Node.js runtime node
  • Generates a clean build structure in lnpkg-build/
  • Super lightweight — written in pure C using gcc

🛠️ Usage

lnpkg <project-folder>

This command will:

  1. Copy node and your index.js into a build folder.
  2. Compile a small C launcher using gcc.
  3. Output a single executable:
    • On Linux: my-app (ELF binary without file extension)

Example

lnpkg my-app

This will create the following structure:

lnpkg-build/
├── source/
│   ├── index.js         <-- Your Node.js app
│   └── node             <-- Node.js runtime
├── my-app               <-- Final executable
  • On Linux, run it with:
./my-app

⚙️ Optional: Configuration File (lnpkg_config)

app-name;
  • Replace app-name with the desired output name.

📄 Requirements

  • Linux (32 or 64 bit)
  • Node installed and available in PATH
  • GCC installed and available in PATH

🧠 Author Notes

This project was built for fun and utility — feel free to hack it, improve it or fork it.


🐧 Created by Leonardo Pinezi (a.k.a. Shinpi)

About

Generate Executable Binary of your node projects for linux. (My changes for Linux Only).

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages

  • C 88.5%
  • Makefile 11.3%
  • JavaScript 0.2%