Node.js hosting on OpsCaptain

OpsCaptain Node.js hosting platform allows you to run and scale Node.js apps in the cloud of your choice without the pain of managing deployments, builds, proxies and configuring databases. You
can do all of this with a simple point and click interface and the CLI.

Step 1. Create your Node.js app

From the dashboard: Log into the dashboard and create a new app using this link. Once the app is created, you can then proceed to deploy your code to it.

Step 1. Ensure your Node.js app is ready to run in production

The runtime exports a variable with name PORT. You must listen for incomming connections using this variable instead of hardcoding any random port in your code
which will only work in your local environment but not anywhere else.

Check out the below examples and how to properly configure the listen port for your Node.js app

Step 3. Create the ocmanifest.json file and set environment variables.

Create a file in the folder that contains your project. Name this file ocmanifest.json. Enter any environment variables you may want to set
and also the name of your app. In our case the name of our app is [helloworld]. We do not have any environment variables so we will not set any.

{
name: "helloworld",
env: {}
}

Step 4. Run opscaptain deploy to launch your app

CD into the project directory. Once there, run the below command to deploy