https://github.com/romagny13/mean-ng2
MEAN with Angular 2 demo (+mLab)
https://github.com/romagny13/mean-ng2
angular2 demo http mean mlab mongodb reactive-forms
Last synced: about 1 year ago
JSON representation
MEAN with Angular 2 demo (+mLab)
- Host: GitHub
- URL: https://github.com/romagny13/mean-ng2
- Owner: romagny13
- Created: 2017-02-25T02:46:50.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-03T16:12:35.000Z (about 9 years ago)
- Last Synced: 2025-01-29T00:52:38.447Z (about 1 year ago)
- Topics: angular2, demo, http, mean, mlab, mongodb, reactive-forms
- Language: TypeScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MEAN (Angular 2) demo
- MEAN : MongoDb, Express, Angular 2, Node
- Reactive forms
- http
## Usage
```
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
```
go http://localhost:3000
Or dev (hot reloading)
```
node server.js
ng serve
```
go http://localhost:4200
## How to
- Create Angular project
```
ng new
```
- Add Node dependencies
```
npm i express mongojs body-parser ejs -S
```
- Mongojs
- Create server, render index page and create api routes
- Add NPM Script
```
"scripts": {
/ * other scripts */
"build": "ng build && node server.js"
},
```
```
npm run build
```