Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnhany97/mern-auth
MERN Authentication boilerplate
https://github.com/johnhany97/mern-auth
authentication express jwt mern mern-stack mongodb nodejs passportjs react redux
Last synced: 19 days ago
JSON representation
MERN Authentication boilerplate
- Host: GitHub
- URL: https://github.com/johnhany97/mern-auth
- Owner: johnhany97
- Created: 2019-07-11T12:31:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T04:25:18.000Z (about 2 years ago)
- Last Synced: 2024-11-14T05:51:04.533Z (3 months ago)
- Topics: authentication, express, jwt, mern, mern-stack, mongodb, nodejs, passportjs, react, redux
- Language: JavaScript
- Size: 1.72 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication: MERN
Demonstrated in this project is a MERN stack project that demonstrates a full authentication cycle following with modern JavaScript standards.
## Acknowledgment
This is based off of a tutorial published by [Rishi Prasad in Bits and Pieces](https://blog.bitsrc.io/build-a-login-auth-app-with-mern-stack-part-1-c405048e3669) but extended to use ES6, Docker, and some other additional bits and pieces (pun intended) all over. Thanks, Rishi, for the amazing guide!
## Setup
You'll need to add your config file which has the required props for your various enviornments, an example is demonstrated as follows:
```json
{
"development": {
"MONGO_URI": "mongo://name:password@some_dev_link_for_dev_db:port",
"SECRET_OR_KEY": "someSecretY'all"
},
"prod": {
"MONGO_URI": "mongo://name:password@some_dev_link_for_prod_db:port",
"SECRET_OR_KEY": "someProdSecretY'all"
}
}
```
You'll also need to run a node installation
```
npm i
```## Running
Development mode
```
npm run dev
```
Production mode
```
npm run prod
```
Watch mode (using `nodemon`)
```
npm run watch
```
Using Docker
```
docker run -p 5000:5000 johnhany97/mern-auth
```