MongoDB, Expressjs, React, Nodejs
MERN is a fullstack implementation in MongoDB, Expressjs, React, Nodejs.
MERN stack is the idea of using Javascript/Node for fullstack web development.
$ git clone https://github.com/Najmul-Islam/mern-boilerplate.git
$ npm i
backend
/config
/db.js
/controllers
/index.js
/middlewares
/errorMiddleware.js
/models
/index.js
/routes
/index.js
server.js
frontend
/public
/src
/components
/Home.jsx
/pages
/Home.jsx
App.js
index.js
package.json
README.md
.env
NODE_ENV=development
PORT=5000
MONGO_URI=your mongo uri gose to here
.gitignore
package-lock.json
package.json
README.md
...
$ cd frontend // go to frontend folder
$ npm i // npm install packages
run the script at the first level:
(You need to add a .env file and add NODE_ENV=development PORT=5000 MONGO_URI=your mongo uri gose to here to connect to MongoDB)
### Start
go to root folder
$ npm i // npm install packages
$ npm run server // run only backend
$ npm run client // run only frontend
$ npm run dev // run backend and forntend concurrently