What is Node.js Application?
This box deploys an application based on Node.js and starts it using forever
The following variables can be modified at deployment time
||Application Entry point file to be started using forever
||Directory where the Application Repository will be cloned
||The port number to use when listening for HTTP connections.
||Repository's url with the source code of Node.js Application
An instance executing this box will use bash scripting to download, install and configure a Node.jsiversal forwarder.
Box events handle the Node.js instance lifecycle as follows:
- Install operation:
- pre_install event script: updates the package's index using the correct package manager.
- github: installs git package.
- install event script: installs nodejs package's source.list if needed and installs Node.js in the instance.
- Configure operation:
- github: clones the repository with the Node.js application.
- configure event script: runs npm install and configures the application's entry point file (i.e. app.js) running elasticbox's config command to replace if present with instance's variables values.
- Start operation:
- pre_start event script: checks for previous forever processes of the node.js application and if some is running it runs forever stopall and then it uses forever to start Node.js application using its entry point.
This deployment supports these Linux distributions:
- Amazon Linux AMI 2015.03
- Centos 6.5, 7
- RedHat 7
- Ubuntu 12.04, 14.04, 16.04
Checkout Node.js documentation.