Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cloudlinux:node.js_selector [2018/05/22 13:24]
Jackson Zhang
litespeed_wiki:cloudlinux:node.js_selector [2023/03/25 13:38] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== How to use CloudLinux Node.js Selector with LSWS ====== +~~REDIRECT>​https://​docs.litespeedtech.com/lsws/cp/cpanel/cloudlinux/#​rubypythonnodejs-selector~~
- +
-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. +
- +
-===== LSWS Node.js Selector support out of the box  === +
- +
-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 [[https://​docs.cloudlinux.com/index.html?​nodejs_selector.html|CloudLinux official documentation]]. +
- +
- +
-===== How to test Node.js with LSWS ===== +
- +
-You can create file with the name index.js and content: +
- +
-<​code>​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();​ +
-</code>+
  • Admin
  • Last modified: 2018/05/22 13:24
  • by Jackson Zhang