Answer the question
In order to leave comments, you need to log in
How to run a Node.js server so that it can be accessed via a domain name?
I am new to Node.JS. I'm trying to figure out how to make a server on a node and nothing happens. I need the server to be accessible through a domain name or through a subdomain. It is desirable to give an example of code using ssl or just tell how to implement it. The server is rented.
Answer the question
In order to leave comments, you need to log in
You can put a web server in front of the node, say nginx, configure it to process requests from the desired domain and further proxy these requests to the port of the node. You can google nginx + nodejs configuration examples.
You take and run. Literally. Any application. And open your domain:port-applications. At least you tried it yourself first, and then asked a question. Naturally, you first need to set up your VPS, domain. Better yet, install nginx in addition and proxy the node through nginx.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question