Revisions
-
e-neko revised this gist
Jul 25, 2020 . 2 changed files with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ - Go to `/etc/init/` - `$ sudo vim yourapp.conf` - Paste **script.conf** - `$ sudo init-checkconf -d /etc/init/script.conf` - `$ sudo start yourapp` - And when you wanna kill the process `$ sudo stop yourapp ` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,6 +15,8 @@ respawn limit 99 5 script export HOME="/root" chdir /path/to/ echo $$ > /var/run/yourapp.pid exec /usr//bin/nodejs /path/to/yourapp.js >> /var/log/node.log 2>&1 end script -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ - `$ sudo vim yourapp.conf` - Paste **script.conf** - `$ sudo start yourapp` - And when you wanna kill the process `$ sudo stop yourapp ` ### Reference -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### Run NodeJS as a Service on Ubuntu 14.04 LTS > With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server? - Go to `/etc/init/` - `$ sudo vim yourapp.conf` -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### Run NodeJS as a Service on Ubuntu 14.04 LTS > With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server? — [kvz.io] (http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/) - Go to `/etc/init/` - `$ sudo vim yourapp.conf` -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,12 @@ ### Run NodeJS as a Service on Ubuntu 14.04 LTS > With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server? - Go to `/etc/init/` - `$ sudo vim yourapp.conf` - Paste **script.conf** - `$ sudo start yourapp` - And when you wanna kill the process `$ sudo stop app ` ### Reference -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ respawn limit 99 5 script export HOME="/root" exec /usr//bin/nodejs /path/to/yourapp.js >> /var/log/node.log 2>&1 end script -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,12 +2,12 @@ description "node.js server" author "Foo Bar" # used to be: start on startup # until we found some mounts weren't ready yet while booting start on started mountall stop on shutdown # automatically respawn respawn respawn limit 99 5 @@ -21,7 +21,7 @@ end script post-start script # optionally put a script here that will notifiy you node has (re)started # /root/bin/hoptoad.sh "node.js has started!" end script -
jobsamuel revised this gist
Sep 5, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ ### Run NodeJS as a Service on Ubuntu 14.04 LTS - Go to `/etc/init/` - `$ sudo vim yourapp.conf` - Paste **script.conf** - `$ sudo start yourapp` ### Reference Thanks to [kvz.io] (http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/) for this! -
jobsamuel created this gist
Sep 5, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Run NodeJS as a Service on Ubuntu 14.04 LTS - Go to `/etc/init/` - `$ sudo vim yourapp.conf` - Paste **script.conf** - `$ sudo start yourapp` # Reference Thanks to [kvz.io] (http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/) for this! This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ description "node.js server" author "Foo Bar" # used to be: start on startup # until we found some mounts weren't ready yet while booting: start on started mountall stop on shutdown # Automatically Respawn: respawn respawn limit 99 5 script export HOME="/root" exec /usr//bin/nodejs /where/yourapp/is/app.js >> /var/log/node.log 2>&1 end script post-start script # Optionally put a script here that will notifiy you node has (re)started # /root/bin/hoptoad.sh "node.js has started!" end script