MEVN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for MongoDB, Node.js, Express, and Vue.JS based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components.
Before you begin I recommend you read about the basic building blocks that assemble a MEVN.JS application:
- MongoDB - Go through MongoDB Official Website and proceed to their Official Manual, which should help you understand NoSQL and MongoDB better.
- Express - The best way to understand express is through its Official Website, which has a Getting Started guide, as well as an ExpressJS guide for general express topics. You can also go through this StackOverflow Thread for more resources.
- Vue.JS - Vus's Official Website is a great starting point. You can also use Thinkster Popular Guide, and Egghead Videos.
- Node.js - Start by going through Node.js Official Website and this StackOverflow Thread, which should get you going with the Node.js platform in no time.
├── services
│ ├── stores-catalog-service
│ │ ├── intergration-test
│ │ ├── src
│ │ ├── .eslintrc.json
│ │ ├── .create-image.sh
│ │ ├── Dockerfile
│ │ ├── env
│ │ ├── package.json
│ │ ├── README.md
│ │ └── start-service.sh
│ └── albums-service
│ │ ├── intergration-test
│ │ ├── src
│ │ ├── .eslintrc.json
│ │ ├── .create-image.sh
│ │ ├── Dockerfile
│ │ ├── env
│ │ ├── package.json
│ │ ├── README.md
│ │ └── start-service.sh
│ └── raml-spec
│ │ ├── albums-service
│ │ └── stores-catalog-service.sh
│ └── api-gateway
│ │ ├── intergration-test
│ │ ├── src
│ │ ├── .eslintrc.json
│ │ ├── .create-image.sh
│ │ ├── Dockerfile
│ │ ├── env
│ │ ├── package.json
│ │ ├── README.md
│ │ └── start-service.sh
│ └── mongo-replica-with-docker
│ │ ├── admin.js
│ │ ├── albums.js
│ │ ├── create-replica-set.sh
│ │ ├── env
│ │ ├── grantRole.js
│ │ ├── mongo-keyfile
│ │ ├── replica.js
│ │ └── reset-docker-machines.sh
│ └── _docker_setup
│ │ ├── create-images.sh
│ │ ├── reset.sh
│ │ ├── setup-swarm.sh
│ │ └── start-services.sh
├── tests
│ └── k6
├── web
│ └── webapp
├── .gitlab-ci.yml
├── .jshintrc
├── app.yml
├── LICENCE.md
├── package.json
├── README.md
├── kraken.sh
└── .gitignoreMake sure you have installed all of the following prerequisites on your development machine:
- Git - Download & Install Git. OSX and Linux machines typically have this already installed.
- Node.js - Download & Install Node.js and the npm package manager. If you encounter any problems, you can also use this GitHub Gist to install Node.js.
- MongoDB - Download & Install MongoDB, and make sure it's running on the default port (27017).
- Yarn - You're going to use the Yarn Package Manager to manage your front-end packages. Make sure you've installed Node.js and npm first, then install yarn globally using npm:
$ npm install -g yarnThere are several ways you can get the MEVN.JS boilerplate:
The recommended way to get MEVN.js is to use git to directly clone the MEVN.JS repository:
$ git clone https://github.com/oregand/MEVN.git MEVNjsThis will clone the latest version of the MEVN.JS repository to a MEVNjs folder.
Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your MEVN application.
The boilerplate comes pre-bundled with a package.json file that contain the list of modules you need to start your application.
To install the dependencies, run this in the application folder from the command-line you need to run one step:
- Client && Server
$ cd /web/webapp && yarnThis command does a few things:
- First it will install the dependencies needed for the application to run.
- If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.
- When the yarn packages install process is over, yarn will initiate a install command to install all the front-end modules needed for the application
- To update these packages later on, just run
yarn update
Run your application using yarn:
- Client
$ yarn run dev- Server
$ node server.jsYour application should run on port 8080 with the development environment configuration, so in your browser just go to http://localhost:8080
That's it! Your application should be running. To proceed with your development, check the other sections in this documentation. If you encounter any problems, try the Troubleshooting section.
Explore config/dev.env.js for development environment configuration options.
To run your application with production environment configuration:
$ npm startExplore config/prod.env.js for production environment configuration options.
You can run the full test suite included with MEVN.JS with the test task:
$ npm testThis will run both the server-side tests and the client-side tests.
To execute only the unit tests, run the unit task:
npm run unitTo execute only the e2e tests, run the e2e task:
npm run e2e- Coming Soon!
You have your application running, but there is a lot of stuff to understand. I recommend you go over the Official Documentation. In the docs we'll try to explain both general concepts of MEVN components and give you some guidelines to help you improve your development process. I tried covering as many aspects as possible, and will keep it updated by your request. You can also help us develop and improve the documentation by checking out the gh-pages branch of this repository.
- Coming Soon!
I welcome pull requests from the community!
Utterly inspired by the great work of Vue.JS