Ok, I've tested creating and external app + the .htaccess rules above and using the following code
Code:
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(50000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:50000/');
However it's not usable on shared hosting just yet.
Cloudlinux needs to finish implementing virtual networking to allow users to create their own ports without affecting other users.
We would then need a cPanel plugin to allow users to lauch applications and make sure they are running and start with the server without haveing to run a cronjob to make sure it's still running (unless there is some other way to allow users to make sure a job is running…).
The page shows in the browser but if an application is stopped another user to take the first users port making the first user change his script to another port.
Another user could also show the first user's script on his own website, not sure how we would get around this ?
Litespeed would need to be detected as running as a specific user so that Cloudlinux's future virtual networking could allow to firewall off other user's ports…