I am new to node js. I am using express with node js. My node application is running properly, need a help for the remove port number from the URL. I host a site on gen 4 vps linux using cpanel. Everything is working perfectly ,but cant access domain without port number EX:
http://js4.red:8002/ This URL is working but I need to remove this port number. The correct URL should be:
What is the right way to remove port from node url and run app on simple url without port?
I have tried this solution click here
Another thing to mention is The default port for http: is 80 so to remove the port from the URL it shows the directory structure
The below code shows the server configuration
var express = require("express")
var http = require("http")
var port = process.env.PORT || 8002
var server = module.exports = express();
http.createServer(server).listen(port, 'js4.red');