I use the node.js and socket.io.
My application runs on the port 3000. The application starts from from the url: mydomain.com:3000/
I want to run the application from mydomain.com - I want to remove the port from the url.
Where and how can I set this setting?
To get the full URL in Express and Node. js, we can use the url package. to define the fullUrl function that takes the Express request req object.
File. delete() method from the Node. JS SDK is expecting the path of the file to remove from disk. Note: The path of the file is relative to the root of your application.
Find your server.listen
call and change the port from 3000
to 80
. Don't forget that you have to run the program with the CAP_NET_BIND_SERVICE
capability (see capabilities(7)
for details) in order to bind to ports less than 1024 on Linux systems. root
privilege will contain this, and other, privileges.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With