Skip to content

Template with Node, React, and MongoDB integrated. Comes with user auth set up (passport, JWT token), and working signup/login/logout/localStorage.

Notifications You must be signed in to change notification settings

NeedsAUsername/express-react-mongo-template

Repository files navigation

Summary

  • template for a express/react/mongo app with passport/JWT user authentication and working signup/login/logout forms

Features

  • uses my express-react-mongo-template at https://github.com/NeedsAUsername/express-react-mongo-template
    • Connected React
    • Connected MongoDB
    • Set Up User Auth in Express with JWT and Passport
    • Set Up User Authentication in React side
      • login/signup/logout forms working
      • stores token in local storage and include in header
      • fetches user on app mount if local storage has token

Setup

$ npm install

$ npm run client-install

create an .env file at root with the following (to access database):

MONGO_URI="yourMongoURIHere"

to start Express server: $ npm run server

to start React server: $ npm run client

to start both servers: $ npm run dev

About

Template with Node, React, and MongoDB integrated. Comes with user auth set up (passport, JWT token), and working signup/login/logout/localStorage.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published