This repository contains the step by step procedure based on the commits to build the Full Stack MERN Application using JWT Authentication, which is described by the three parts article:
- Creating a full-stack MERN app using JWT authentication: Part 1
- Creating a full-stack MERN app using JWT authentication: Part 2
- Creating a full-stack MERN app using JWT authentication: Part 3
- Creating a full-stack MERN app using JWT authentication: Part 4
You should be having these minimum requirements in your system to start working on the project.
- Git
- Node.js
- A supported browser like Google Chrome or Mozilla Firefox
If you are planning to contribute or recreate this repository, you should be having the following in your system to start the development.
- Git
- Node.js
- A supported browser like Google Chrome or Mozilla Firefox
- Code Editor supporting Babel like Visual Studio Code
- React Developer Tools
First clone this repository to your local machine.
There are two parts in the repository, which you might need to run.
To use the server, navigate to the server
directory, install the dependencies using:
$ cd server
$ npm install
To use the client, navigate to the client
directory, install the dependencies using:
$ cd client
$ npm install
You have to run two processes, each for the server and the client. Make sure you have two terminal processes running for the same.
$ cd server
$ npm start
$ cd client
$ npm start
If you need HTTPS in development, use:
$ cd client
$ HTTPS=true npm start
If you would like to run in production mode for the client, use:
$ cd client
$ PORT=80 npm run start:production
If you need HTTPS, use:
$ cd client
$ HTTPS=true PORT=443 npm run start:production