domfarolino / angular2-login-seed

(deprecated) Seed app w/ Angular2, Node, Express, and OAuth login
https://domfarolino.com/angular2-login-seed
MIT License
181 stars 77 forks source link

Custom Express Server setup should mention the 'apiBase' variable #17

Closed bdinsmor closed 7 years ago

bdinsmor commented 7 years ago

In src/app, the app.module.ts file needs to have the apiBase value point to the local express server if you wish to run locally.

Great project!!

domfarolino commented 7 years ago

I don't think this is the case. The local angular app should be able to hit the remote API locally since the remote API allows cors on the localhost origin. This means anyone should be able to pull the entire project down, build the front-end and hit the remote API hosted on Heroku.

Optionally, you can follow the instructions in the README to setup your own database for your local express server however since that requires a lot more work to get up and running, I have the apiBase set to the remote API so people can get off the ground quickly. Is this not working for you?

bdinsmor commented 7 years ago

Running a local dev express server is working for me after changing the apiBase to hit my local express server (http://localhost:5000) - which is why I tried to label the issue as only pertaining to "Custom Express Server"

Clear as mud? Feel free to close if you think it is a poorly worded issue - it is just impossible to have the GUI hit the local express back-end without changing that variable - that is all I wanted to point out.

domfarolino commented 7 years ago

Oh ok I see. Yes there could probably be better documentation around this in the README to tell people to switch that value. If you want to submit a documentation PR to clear the issue up for other people in the future that would be great.

domfarolino commented 7 years ago

Do you want to go ahead and change the doc or do you want me to? Personally I just like getting people involved in projects so if you want to throw something up I'd be happy to review it.

adamhpan commented 7 years ago

I've made a PR for this #20 . Check it out if it help you out @bdinsmor.

domfarolino commented 7 years ago

Thanks!