-
Notifications
You must be signed in to change notification settings - Fork 2
Deployment
I've been reading in the Express Forum about deploying Node.js applications and found some interesting points of view about that. My proposal is to deploy using Capistrano. I hope to comment about it in this space soon.
The thing that takes me to this space now is related to init scripts... Some days ago I was "fighting" against Pentaho BI Server init scripts, and based on my previous work, I propose the following script (init.d/sqlite) for Node.js applications. For installing, you need to change the following variables:
SQLITEAPP_DIR="/home/rodolfo/workspace/express-examples/sqlite" SQLITEAPP_LOG="$SQLITEAPP_DIR/log/sqlite.log"
After changing that variables to the root directory where you have your Express App, and where you want to leave logs, you just have to follow this steps:
$ sudo cp init.d/sqlite /etc/init.d/sqlite $ sudo chmod +x /etc/init.d/sqlite
You should change the name of the script and variables depending on your app name. For starting the server:
$ sudo /etc/init.d/sqlite start $ sudo /etc/init.d/sqlite stop
Enjoy!