Hi I have node js application. I run it locally as :
http.createServer(processRequest).listen(1337);
To rich my application in browser I need to write: localhost:1337/index.html
So I have 2 questions:
www.myapp.dev/index.html
instead of localhost:1337/index.html
, what I need to change in my code?www.myserver.com
, what I need to put in my app in order to do it work in this domain?Thanks.
1337
to 80
(technically you don't need to do that, you could run an proxy on port 80 instead).Your app isn't paying attention to the Host header, so it doesn't matter what Host header the browser sends.
Outside the app you will need to configure your DNS to point the hostname at your IP address.