Вопрос

I am absolutely new to mean stack, but i am trying to get my root domain name to show the app directory running after i type grunt, but it only works at website.com:8080/!#/ how to git it to be website.com. I have tried modyfing the server. js below but to no success.

This is my server.js file

//Start the app by listening on <port>
var port = process.env.PORT || config.port;
app.listen(8080);
console.log('Express app started on port ' + port);

Thanks.

Это было полезно?

Решение

You can set the port 80 directly in your code but your application needs to run with root privileges if the port is less than 1024.

IMO, a better way is to use Apache or Nginx (HTTP server on 80) with a reverse proxy to 8080. (https://www.google.com/search?q=nginx+reverse+proxy)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top