Brandon Aguilar
Brandon Aguilar

Reputation: 399

Angular and Express - File structure

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:

Upvotes: 2

Views: 2623

Answers (1)

Yakov Fain
Yakov Fain

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

Related Questions