This application is a template for the MEAN stack ( Mongo , Express , Angular , Node ) with backend senecaJS microservices. There are currently 2 branches in this project.
Branch | Details |
---|---|
master | contains User service which uses mongoDB, so you will need to have monogoDB installed locally / remotely |
BranchWithoutMongo | without the implementation of User service, can spin the app right away with Node and NPM |
- Frontend
- EJS files with AngularJS, MVVM architecture.
- Webserver
- Most of the RESTful from frontends are being handled by Express webserver. Routings are being handled in here as well.
- Backend
- Backend is being handled by seneca microservices in this application, greet service and number service. The communication between seneca microservices are through tcp connections by defining HOST and PORT for seneca listeners and clients.
- Install nodeJS 4.4.2 LTS
- Clone this repo
- install node dependencies
bash installnpmpackages.sh
- start the app,CMD
pm2 start ecosystem.json
- app will be running on localhost:3000
- Install docker compose
- Clone this repo
- CD into /docker & CMD
docker-machine env
- Check DOCKER_HOST with env file and make sure they match.
- Run the command, eg.
eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
- Run docker compose, CMD
docker-compose up -d
- The app will be running on DOCKER_HOST:3000
Note | PROXY_HOST might need to be configured depending on what the DOCKER_HOST is. |
---|
Note | to check if docker is running, CMD docker ps and it will show you a list of running containers if exist |
---|