Angular 8 with an api

28 views
Skip to first unread message

Tito

unread,
Jul 29, 2019, 3:59:05 PM7/29/19
to Angular and AngularJS discussion
Greetings,

Finally diving in into angular 8 (why did I not before!!! bcs I love it)
This is what my app folder looks like (repo is https://github.com/yosiasz/tourofheroes-mssql)

./src
  app
  server --here my server express.js api resides

1. Is this a good approach?
2. If it is acceptable how do I start both client and server in one command?

Thanks much

Sander Elias

unread,
Aug 14, 2019, 4:54:54 AM8/14/19
to Angular and AngularJS discussion
Hi Tito,

1, Yes, perhaps take a look an NX from Nrwl, it even provides generators that deal with this.
2. use the scripts section in your package.json.

```
scripts : {
  startAll: 'ng serve && node server/server
}
```

you might want to use a tool to start them in parallel, there are several NPM modules that take care of this.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages