Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
The erb template for /engineyard/bin/app_chat_node
#!/bin/bash
# Author: Mikong Galero
/data/<%= @app_name %>/shared/bin/build_node_app_environment
source /data/<%= @app_name %>/shared/config/env
source /data/<%= @app_name %>/shared/config/env.custom
case "$1" in
status)
pm2 show ${application}
;;
start)
pm2 start ${current_path}/app.js --name="${application}"
;;
stop)
pm2 stop ${application}
;;
reload)
pm2 reload ${application}
;;
deploy)
pm2 reload ${application}
;;
restart)
pm2 reload ${application}
;;
*)
echo "Usage: $0 {status|start|stop|reload|restart|deploy}"
exit 1
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.