How to enable SSL/TLS for Express.js application

For node.js applications, you can enable SSL on the application side or using Nginx or Apache running as a reverse proxy. To enable SSL for a node.js express application, use the following code. const fs = require(‘fs’) const https = require(‘https’) const express = require(‘express’) var port = 3000; var options = { key: fs.readFileSync(‘./ssl/ssl.key’), … Read more

Install Node.js on Ubuntu/Debian

To install Node.js on Ubuntu, first set up repository as per your version requirements. For NodeJs v24.x For NodeJs v22.x For NodeJs v21.x For NodeJs v20.x For NodeJs v18.x For NodeJs v17.x For NodeJs v16.x For NodeJs v15.x For NodeJs v14.x For NodeJs v12.x For NodeJs v11.x Node.js v10.x Node.js v9.x Node.js v8.x Node.js v6.x … Read more

nodemon

Node.js applications when you run with nodejs command, need to restart when a change is made to the source code of the application. nodemon will watch your application source code for changes, and restart if a change is detected. To install nodemon, run Example nodejs

pm2 process manager for node.js

Auto Start pm2 on bootHow to host static site using pm2 pm2 is a process manager for node.js applications. It is similar to forever. http://pm2.keymetrics.io First you need to install npm, on Ubuntu/Debian, run To install pm2, run Start an Application Start an Application with name Start npm Start the Application in Cluster mode with … Read more

Install Node.js on CentOS Server

You can find latest version of Node.js at https://nodejs.org/en/ To install Node.js on CentOS 7/8 Add node.js repository NodeJS 12.x curl -sL https://rpm.nodesource.com/setup_12.x | bash – NodeJS 11.x curl -sL https://rpm.nodesource.com/setup_11.x | bash – NodeJS 10.x curl -sL https://rpm.nodesource.com/setup_10.x | bash – NodeJS 8.x curl -sL https://rpm.nodesource.com/setup_8.x | bash – NodeJS 6.x curl -sL https://rpm.nodesource.com/setup_6.x … Read more