NodeJS
  • Updated on 21 Jul 2020
  • 1 minute to read
  • Contributors
  • Print
  • Share
  • Dark
    Light

NodeJS

  • Print
  • Share
  • Dark
    Light

The deployment process is pretty much the same for different NodeJS frameworks, as we use the same package manager and server.

To deploy a NodeJS application, click "Create a service" in the top-left corner of your Dashboard and choose Back-end application.

Screen Shot 2020-06-17 at 10.00.32 AM.png

Connect your Git account and choose the repository to deploy.

Like all back-end applications, NodeJS must run on a specific cloud server. Choose the location and configuration of this cloud server. You can upgrade it in the future.

Screen Shot 2020-06-17 at 10.07.58 AM.png

Choose your framework in the App customization window. Make sure the name of the main file in the Start command is the same one you're using. We use pm2 as the process manager for all NodeJS frameworks because it's fast, reliable and scalable.

Click Deploy when you've checked all the parameters.

Screen Shot 2020-06-17 at 10.08.40 AM.png

You'll see the deployment in progress. When it's complete, you'll receive a notification. You can also send these notifications to your Slack.

Usually it takes some time to install the cloud server during the first deployment.

What to do if deployment fails

First of all, check the deployment log. You'll see the stage where something went wrong.

The most common issues are with the launch command. Check that everything is working properly with pm2 in your development environment. Check that all the modules you need to launch the application are in the package.json file.

Also, we are here to help, so don't hesitate to ask us about the causes via chat.

Was this article helpful?