- MEAN : MongoDb, Express, Angular 2, Node
- Reactive forms
- http
npm i
Create a free db on mLab with a collection 'posts'. Add a user and change mongodb connection in 'routes/api'
build
npm run build
Or dev (hot reloading)
node server.js
ng serve
- Create Angular project
ng new <project-name>
- Add Node dependencies
npm i express mongojs body-parser ejs -S
-
Create server, render index page and create api routes
-
Add NPM Script
"scripts": {
/ * other scripts */
"build": "ng build && node server.js"
},
npm run build