This repo is forked from Basic-MERN-Stack-App.
All credits go to hemakshis.
- Make sure you have yarn Node.js & MongoDB.
- Run (from the root)
yarn install
andcd client && yarn install
. - Start MongoDB service of your choice.
- Set environment variable for the following
JWTSECRET
to a secret key (just make up one.)MONGODBURI
to the connecting string to your MongoDB instance. For example,MONGODBURI=mongodb+srv://user:[email protected]/test?retryWrites=true&w=majority
- Build UI with
cd client && yarn build
. No need to run UI since this is only for development mode. We are aiming for deployment only. - Run
yarn server
to start the server. By default, it will run on port 5000. Additionally, it contains the client inclient/build
(this is why the client must be built prior to yarn server.) The production URL is currently running at http://localhost:5000.