• This repository has been archived on 18/Nov/2021
  • Stars
    star
    115
  • Rank 304,157 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple Mern Boilerplate with auth

MERN Boilerplate

Are you looking for a MERN boilerplate for auth included. That's the Boilerplate for you!

Tecnologies Used

  • MongoDb and Mongoose - MongoDb as a Database and mongoose as as a Object Data Modeling library for MongoDB and Node.js
  • Express - as a backend Framework
  • React - as a Frontend Framework
  • Node - runtime JavaScript
  • Redux - as a state management tool
  • JsonWebToken - for creating JSON-based access tokens
  • bcryptjs - for hashing the user passwords

Get Started

git clone repoURL

Add a default.json file in config folder with the folowing

{
  "mongoURI": "<your_mongoDB_Atlas_uri_with_credentials>",
  "jwtSecret": "secret",
}

Install server dependencies

npm install

Install client dependencies

cd client
npm install

Run both Express & React from root

Because I install concurrently as a dev dependency you can run both the server and the client with just one command

npm run dev

Build for production

cd client
npm run build

Remember to change to "name" in the package.json and in the package-lock.json

Todo

  • Tests
    • Backend (api)
    • FrontEnd
  • More comments

Contributing

Feel Free to report bug or contribute to improve this boilerplate

Author

Paolo D'Elia

License

MIT