MEAN (full) stack application which comprises of MongoDB, ExpressJS, Angular and NodeJS. MongoDB takes care of the back end database, NodeJS and ExpressJS are for server side rendering, rest apis, and Angular is for front end.
Docker Compose can be used to create separate containers (and host them) for each of the stacks in a MEAN stack application. MEAN is the acronym for MongoDB Express Angular & NodeJs
frontend is developed in Angular, it's in forntend folder Details
Api folder contains REST apis which is developed using expressjs Details
We are using Mongodb as database.
We have uses NGINX loadbalancer in case if there is a requirement that frontend and api need to be exposed on same port. For configutration please check loadbalancer/nginx.conf
-
Updated Connection String : "connectionString":"mongodb://database/mean-docker"
-
To run the project run below command:
docker-compose up
- Install latest Node js
- Install Nodemon as global package (To run exprerssjs in development mode)
npm install -g nodemon
- Optional Install Angular CLI
npm install -g @angular/cli
- Install Mongodb locally or Signup for a free account
- Before running the project make sure that you are able to connect MongoDb , you can use Robo 3T for it
- Update connection string in config.json file. (in api folder)
- Navigate to api folder and install all dependencies.
RUN
npm i
- Navigate to forndend folder and install all dependencies.
RUN
npm i
- From same folder RUN
npm start