Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Get Ready for Production with Node.js

Video loading...

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:04
    In this lesson, we'll cover installing PM2,
  • 0:07
    a Node.js module to manage your Node applications.
  • 0:11
    We'll then configure PM2. Then we're going to add SSL configuration
  • 0:14
    for our Node.js server application.
  • 0:17
    And then lastly, we'll start up our Node.js application with PM2.
  • 0:21
    So I'm at
  • 0:26
    which is the GitHub project page for PM2.
  • 0:28
    And I'm reading the Read Me file currently.
  • 0:31
    You can see that PM2 is described as a production process manager
  • 0:35
    for Node.js applications with a built-in load balancer.

Get Ready for Production with Node.js


Once you're happy with your Node.js setup in a local development environment, there are some further steps to take before running this set up in a production environment.

While not a requirement, I would highly recommend you use an SSL certificate, and configure your Node.js application and the Drupal Node.js module to run in HTTPS. You can read more about SSL certificates at The Linux Documentation Project.
Up until this point, we have been starting our Node.js application manually, from the command line. This is not a good method for a production environment, so we'll use PM2 to manage the running of our application.

In this lesson, I will show you how to:

  • Install PM2, a Node.js module to manage your Node applications
  • Configure PM2
  • Add SSL configuration for the Node.js server
  • Start up our Node.js application with PM2