This is an old revision of the document!


How to use CloudLinux Node.js Selector with LSWS

As JavaScript became one of the most popular programming languages, more and more customers demand Node.js hosting. CloudLinux Node.js Selector was introduced to facilitate the performance related to Node.js. LSWS added CloudLinux Node.js Selector support starting from 5.3RC1 release.

Node.js Selector from Cloudlinux is supported by Litespeed Web server out of the box. You will need only to setup correctly the CloudLinux Node.js selector. You can refer to CloudLinux official documentation.

You can create file with the name index.js and content:

var http = require('http');
var server = http.createServer(function(req, res) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    var message = 'It works!\n',
        version = 'NodeJS ' + process.versions.node + '\n',
        response = [message, version].join('\n');
    res.end(response);
});
server.listen();
  • Admin
  • Last modified: 2018/05/22 13:24
  • by Jackson Zhang