-
Notifications
You must be signed in to change notification settings - Fork 1.2k
How to change 'localhost' so app can be accessed from outside/public IP? #107
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 see you're getting errors with jpegtran and mongoose, maybe this would help? #106 (comment) |
Thanks so much for the fast response. I followed everything you suggested on a new directory except I ran I am brand new to this, so I don't know the background of running these apps, but shouldn't I start the Mongo server before running
|
Yep, that's right. That should fix your connection error. |
How should I start Mongo? I tried:
and
Shouldn't I already have Mongodb/mongoose installed in my project's node_module? How should I use them?
(btw, I have "generator-angular-fullstack" installed in my ~/local/lib/node_modules.) Do I need some global Mongo/Mongoose installed in a root directory? |
Well mongoose was installed through npm, so that should be fine, but it relies on a connection to a mongoDB database. MongoDB has to be installed separately from the project, it needs to be installed on the system like Node does. I'm not sure how it works with amazon web service, but for running it on a local computer I just install it from http://www.mongodb.org/downloads. If the node server is launched in
It will look for environment URIs for mongolab or mongohq, and if it doesn't find either one it will default to the local mongodb installation, and create or use the fullstack DB. So it might be easier for you to use mongolab/mongohq or some other third party mongodb hosting rather than setting it up mongoDB on AWS, but I don't know how AWS works. |
So if I understand your reply correctly, angular-fullstack does not include Mongodb. I have to get it on my own (it's basically an Ubuntu machine provided by AWS, so being AWS is nothing special). Angular-fullstack only includes the package to connect to Mongodb, i.e. connect-mongo? btw, thanks for the quick responses. |
Exactly. |
Thanks! Where exactly in angular-fullstack project do I configure the settings for MongoDB? (I'll leave this issue open until I can get it from the browser, in case the "localhost" does become an issue.) |
No problem :). The configurations are in the |
Hi DaftMonk, so it turns out you were right all along, "localhost" wasn't the issue. :D Once I got MongoDB installed and started on my machine (I want the db to be local for now), the app automatically connected. Everything works. You rock! Thank you! |
But why mongos.js can't connect to localhost: 27017 without internet connection? I am on windows7. Mongodb shell works just fine, also port 28017 is ok. But in browser there is error 500. |
I have installed generator-angular-fullstack on my AWS EC2 machine with a public IP address without any major problems (just the jpegtran minor issue). When I run
grunt serve
, it starts "Waiting ... " as expected, but none of my browsers could connect to the.public.ip:9000.I've seen this before with just the plain generator-angular. It was solved in Gruntfile.js by changing
localhost
to "0.0.0.0
to access the server from outside".I did try replacing all the "localhost"s to "0.0.0.0" in my current angular-fullstack's Gruntfile.js, but I still can't connect to it, nothing seems to change from the
grunt serve
output at least.If the localhost is indeed the problem, how should I fix it?
If not, what is causing the failure to connect on browsers?
Here is my
grunt serve
output:The text was updated successfully, but these errors were encountered: