Make sure Node.js is installed on your computer which should be the case if you are deploying Meteor.js or Node.js.
Install the CLI by running the below command:
Generate a package json file in the root directory of your application files. By default, the nodechef platform executes your code using the latest node js version. To specify a different version, use the "engines.node" attribute in the package.json file. Note you must specify the version explicitly. eg: "node" : "0.10.41". By default, the entry point of your application is the index.js script. To specify another script as the entry point, use either the "main" or "scripts.start" attribute.
On deployment, your local node_modules folder is not included in the zip package uploaded to the server. Modules from your package.json are cached on the build server for faster builds.
By default to start your application NodeChef searches for a scripts.start in your package.json. In case you want to customize your build, you can also include a postinstall script as well which NodeChef will run after running npm install
In step 5 we will show you how you to start your app with another script other than the start script. This is useful in cases where the same code base serves different functions such as a background worker and also the web app layer
Log in and navigate to the Dashboard. Click on deployments and complete the form. You will be required to select the size of your container and the region where your cluster is to be hosted.
If you will like to launch your app with custom environment variables such as ROOT_URL pointing to your domain, follow the below steps.
Once you log in, you will remain logged in on your computer forever until you log out.
** IMPORTANT ** - For accounts that signed up with a third party log in provider such as GitHub, Bitbucket etc. you must first create a password for your account to be able to use the CLI. You can do this from the dashboard under the My Account section. Simply enter a password and save changes.
From the command prompt or terminal log in and then deploy your app.
Reference the package.json script segment shown at step 2 under working with NPM scripts. The below command will start your app using "node jobs.js" instead of the start script "node app.js"
In the above steps, we created an environment variable file and we always have to specify the name of the app to be deployed with the [-i] option. You can however create a file with name ncmanifest.json in the root directory of your project folder. You can then enter the name of your app together with your environment variables as seen below:
Whenever the CLI detects the ncmanifest.json file in the root directory of your application, it will automatically attempt to parse the name of your app and other parameters.
The NodeChef base image runs Ubuntu 14.04 and comes with the below listed set of packages pre-installed.
In some cases you might want to install additional ubuntu packages other than the ones listed above. To do so, Navigate to the Task manager on the dashboard and click on App actions → Startup bash script. Write the bash script intended to run on Ubuntu which will install the package and use the save script button to trigger this update.