MERNjs is a full-stack JavaScript open-source solution, which provides a solid starting point for MongoDB, ExpressJS, ReactJS and NodeJS 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 we recommend you read about the basic building blocks that assemble a MERNjs 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.
- ReactJS - React's Official Website is a great starting point.
- Node.js - Start by going through Node.js Official Website which should get you going with the Node.js platform in no time.
Make 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).
To run your application follow this steps.
$ npm install
// build the application
$ npm run build
// start the application (without debug mode)
$ npm start
// start the application (with debug mode)
$ npm run debug
// live changes of client side
$ npm run live:client
// live changes of server side (without debug mode)
$ npm run live:server
// live changes of server side (with debug mode)
$ npm run live:server:debug
Note: Please make sure your MongoDB is running.
Your application should run on port 3000 with the default (development) environment configuration, so in your browser just go to http://127.0.0.1:3000/ for Client App, http://127.0.0.1:3000/admin for Admin App & http://127.0.0.1:3000/api for RESTful APIs.
Full Name: Administrator
Email: [email protected]
Password: admin
Role: Administrator