very interesting. so a server dedicated to serving my api. I like that and I used to do that but somewhere in the process of learning angular, I kind of got away from it for some reason. because I was thinking other applications could use the api and it is not tied to one specific application. (consuming application agnostic - caa, make up my own tech acronyms woohoo!) :)
On Tuesday, July 25, 2017 at 6:44:44 PM UTC-7, Sander Elias wrote: > > Hi Tito, > > The advice Zlatko gave is solid. Create a separate backend/API server. > keep that out of your frontend folder. > Developing nowadays will give you a enormous amount of code in > node_modules. For your angular project, this is totally unimportant. Once > you build for staging/production, everything is neatly packed in a ./dist > folder you can then deploy. No node_modules needed wherever. > That can not be said when you need to deploy a nodejs server. But you only > need 1 of those on your production. (and probably also on your dev machine) > > While you develop, you can use the CLI, and configure it to proxy all all > calls <https://github.com/angular/angular-cli/wiki/stories-proxy>to for > example /api/* through to your nodejs Server. This way, you can develop > using everything the CLI provides, and still use your nodeJS server for the > backend/api calls. > This has an added bonus, that once you are ready to deploy your app, you > can separately host your frontend(for example on AWS S3) from your backend. > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
