ericmdantas / generator-ng-fullstack

Client, server or fullstack - it's up to you. ng-fullstack gives you the best of the latest.
MIT License
704 stars 103 forks source link

Can you explain me how launch app with client and server generate seperately ? #248

Closed Adaok closed 7 years ago

Adaok commented 7 years ago

Hello,

I'm not familiar with MEAN stack application and I would like to know how run the todo app when I generate the client and the server seperately.

I have a 404 error when I want call the Post API.

Thanks in advance :)

ericmdantas commented 7 years ago

Hello, @Adaok.

Which part of the stack are you using ng-fullstack? Client or server?

Adaok commented 7 years ago

Hey @ericmdantas ! I have generate two projects : one only client with ng2, node and typescript, and for the server : same things ng2, node and typescript. I have run first server, after the client, and when I want to add a item, I have a 404 error :/

ericmdantas commented 7 years ago

I see.

Since you're using a proxy, you'll have to change some props inside your .alivrc. The properties proxyWhen and proxyTarget will have to be changed to fit your case. proxyWhen is the prefix given to your api calls, generally it's /api/* (so everything that hits this will be reverse proxied) and proxyTarget is the url of your server responsible for the response, it could be something like http://localhost:1234, for example.

Adaok commented 7 years ago

Thanks you @ericmdantas , that was the reason for my error. Thanks again for your reply, I will be able to continue to look to work with your generator. :)

ericmdantas commented 7 years ago

👍