Reputation: 399
I've read a lot of articles and post about the correct structure of angular and express. I just want to know, should I use the same node_modules folder to angular/express, or should I separete them ?
My structure is somthing like this:
application
-- here I have the front end(angular)
server
-- here I have the server files(express)
node_modules(should I put it here, or inside each folder?)
Upvotes: 2
Views: 2623
Reputation: 12376
The client and server should be separate projects with the separate package.json files and separate node_modules. Take a look at the client and server projects here: https://github.com/Farata/angulartypescript/tree/master/code-samples/Angular8/chapter13/ng-auction
Check the scripts section in the package.json in the client dir. If you run the command npm run build
in the client dir, the angular app will be deployed on the server.
Upvotes: 1