Complete MEAN stack application with authentication using json web tokens. Angular CLI, MongoDB and NPM need to be installed to run / build the app. Angular 2 is being used in this example app.
1.0.0
-
Install Homebrew: https://brew.sh/
-
Install Node / NPM: https://changelog.com/posts/install-node-js-with-homebrew-on-os-x
-
Install MongoDB:
$ brew install mongodb
In case you have an older version of MongoDB installed you might ned to remove it first before you can install the latest version:
$ brew unlink mongodb
-
Install Node / NPM: https://nodejs.org/en/
-
Install MongoDB: https://www.mongodb.com/download-center?jmp=nav#community
Install Angular CLI:
$ npm install -g angular-cli
Install nodemon to automatically update any changes in your code while the node server is running.
$ npm install -g nodemon
Install the dependencies:
$ npm install
Start MongoDB (if not yet started):
$ mongod
Start MongoDB shell if needed:
$ mongo
Run the dev mode:
# Run nodemon
$ nodemon
# Switch to dev folder
$ cd angular-src
$ ng serve
The app should be available on: http://localhost:4200
Build the app:
# Switch to dev folder
$ cd angular-src
$ ng build
Run the app (from app root folder only!):
$ npm start