1.0.4 • Published 7 years ago
mern-boilerplate v1.0.4
MERN Boiler Plate
How to create your new MERN app:
run this command to install boiler plate globally in your machine:
npm install mern-boilerplate -gNow go to the dir you want your app to be in then run this command:
mern-boilerplate create <dirname>Do not put braces and name should be all lowercase without any space(use - or _ instead)
Now you will have an app in the dir you mentioned in the cmd above
Run the Express server
just run:
npm installnpm startRun seeder script to get dummy data
npm run seederNOTE:
- You should have MongoDB installed in your machine to generate dummy data in DB.
You will get everything setup for your Node and Express backend.
Get ready to develop your front-end with React
cd clientnpm installFor Development:
npm run devFor Production :
npm run prodNOTE:
- Your backend or prod will be on localhost:5000 and front-end will on localhost:3000 in dev
- Please make a .env file and PORT=your env PORT