This is a MERN stack application boilerplate. Session authentication and frontend basic authentication are already handled.
Clone the project, remove the .git file set at the root directory.
rm -rf .git
cd ./client
git init
git add . (yes.)
git commit -m "Initial Commit"
Create an empty git repository for your client application copy the repo url and
git remote add origin <your origin>
git push origin master
cd ./server
git init
git add .
git commit -m "Initial commit"
Create an empty git repository for your server application, copy the repo url and
git remote add origin <your origin>
git push origin master
npm installto install all the dependencies.- create a
.envat same level as thepackage.jsonfile, and set the environement variables. npm startto run the application.
npm installto install all the dependencies.- create a
.envat same level as thepackage.jsonfile, and set the environement variables. npm run devto run the application.
REACT_APP_BACKEND_URL = ???
PORT = ???
MONGODB_URI = ???
FRONTEND_URL = ???
SESSION_SECRET = ????
Enjoy.