A simple starter with frontend using Angular 4+ and API server with NodeJS and Express framework. Typescript is configured for both Frontend and API server.
Frontend is created using angular-cli. So we can use all of the angular-cli commands from client folder.
This starter can be used in two different ways:
- Separate Frontend and API server.
- Both Frontend and API served through single node server in production.
- clone this repository
npm run app-install
-
npm run start: Starts both frontend and API server as separate live reload server. Frontend usesng serveunderneath and API server usesnodemonfor live reload. -
npm run build: Createsdistfolder in bothclientandserverfolders. -
npm run start:prod: Builds theclientandserverprojects and starts it withNODE_ENV=production. This by default setsexpress.statictoclient/distto use this node server to serve frontend also.