-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Question: Why 'grunt serve' binds to localhost host ONLY? #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I do not believe there is anything from the generator preventing you from connecting from a different computer on your LAN. |
@kingcody Thanks for the pointer. I have the latest and I checked config/environment/index.js. I have that change uses 'localhost'. It still doesn't work for me. Only removing the host/ip works. May be it is my network or computer environment. I tried this simple example and I could reproduce the problem, with and without host/ip. It certainly seems for me anyway, that .listen() doesn't work with host/ip. Example code: server.js:var app = require('express')(); var port = 9001; server.listen(port, function(){ app.get('/', function (req, res) { |
@verrol do you still experience the issue with the current |
Closed due to inactivity. |
I am new to Angular-fullstack, but I have used a number of other generators to get here. Why is it, that with AFS, I can't do 'grunt serve' and then load the app from another computer in my network?
When I run nmap from another host to see which ports are opened on the computer where my app is running. Port 9000 doesn't show up, even though the browser on the computer can certainly use it.
I then modified the development env to use my computer IP address, the one I get from the router. It builds, port 9000 is visible from outside, but it doesn't work.
Neither too does 'grunt serve:dist' work even on the localhost. I get a number of 404 error as the browser tries to fetch the page from localhost.
I guess I am missing something simple. But I never had any of these problems with the other generators, but I really would like to use AFS instead of MEAN.js.
I would appreciate any pointer on this issue or steps to fix. Oh, I did some googling and saw others have had the same problem.
Thanks.
.v
PS: If this was done intentionally, why? Since it prevents users from testing on multiple devices during development.
The text was updated successfully, but these errors were encountered: