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 install
to install all the dependencies.- create a
.env
at same level as thepackage.json
file, and set the environement variables. npm start
to run the application.
npm install
to install all the dependencies.- create a
.env
at same level as thepackage.json
file, and set the environement variables. npm run dev
to run the application.
REACT_APP_BACKEND_URL = ???
PORT = ???
MONGODB_URI = ???
FRONTEND_URL = ???
SESSION_SECRET = ????
Enjoy.