tarlepp / angular-sailsjs-boilerplate

'Boilerplate' for AngularJS + Sails.js
MIT License
307 stars 87 forks source link

Error login outside localhost #122

Closed jjgonver closed 8 years ago

jjgonver commented 8 years ago

Hola. I allways test this framework in my PC and login ok with localhost:3001 but when I try to test how It is look like from my smart phone in my local network I can not login.

The next error appear:

'Unknown HTTP status '0', what is this? (HTTP status 0)'

What's happening? Thanks

tarlepp commented 8 years ago

Are you absolutely sure that your smartphone has access to that sails backend?

jjgonver commented 8 years ago

Yes. The homepage load in the phone screen. Now I test from a laptop in the local network too and the same error appear.

tarlepp commented 8 years ago

the homepage is different thing that actual sails backend url, what I was asking. So what is your backendUrl setting in your config.json?

tarlepp commented 8 years ago

And make sure that your sails is running on that address...

jjgonver commented 8 years ago

Now I don't have config.json. At this moment I continue with the default config_example.json For the developement enviroment I have in my PC 2 command sesion, one with 'sails lift' for the backend and the other with 'gulp serve' for the frontend, both in the same pc.

For the error of this test I try from another machine in the local network to navigate to the IP of the developement machine with ':3001' at the end.

tarlepp commented 8 years ago

....

So your frontend thinks that sails backend is running on http://localhost:1337, so eg. in your smartphone that tries to use your smartphone... Did you read the installation instructions, which explains all what you need to do...

jjgonver commented 8 years ago

Ok. Now I understand the problem.

Thanks a lot for your help.

tarlepp commented 8 years ago

So "issue" solved?

jjgonver commented 8 years ago

Yes. Solved! Thanks again.

tarlepp commented 8 years ago

then it would be nice to close these issues...