From 78ffbc1f3009874f92be24b2b1ab193774f1031d Mon Sep 17 00:00:00 2001 From: JeanBaptisteWATENBERG Date: Sun, 14 Oct 2018 20:31:13 +0200 Subject: [PATCH] Add quickstart with node js section to readme --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index b726439..99532ad 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,39 @@ PS C:\Users\Diego\Devel\myapp> "{0:N2} MB" -f ((Get-Item myapp.exe).Length / 1MB 28.51 MB ``` +## Quickstart with Node JS +### Linux +**Make your node js application executable** +1. Add this line at the top of your nodejs index file : +``` +#!/usr/bin/env node +``` +2. Run +```sh +dgiagio@X1:~/Devel/myapp$ chmod +x index.js +``` +**Download `warp-packer`** + +If you save `warp-packer` in a directory in your PATH, you only need to download it once. +```sh +dgiagio@X1:~/Devel/myapp$ curl -Lo warp-packer https://github.com/dgiagio/warp/releases/download/v0.1.1/linux-x64.warp-packer +dgiagio@X1:~/Devel/myapp$ chmod +x warp-packer +``` +**Create your self-contained application** + +```sh +dgiagio@X1:~/Devel/myapp$ ./warp-packer --arch linux-x64 --input_dir . --exec index.js --output myapp +dgiagio@X1:~/Devel/myapp$ chmod +x myapp +``` + +**Run your self-contained application** + +```sh +dgiagio@X1:~/Devel/myapp$ ./myapp +Hello World! +dgiagio@X1:~/Devel/myapp$ +``` + ## Quickstart with Java _In progress_