Skip to content

The perfect starter for any project that requires authentication. Server side: Node-express-graphql. Client side: React, Apollo JS

Notifications You must be signed in to change notification settings

danielniquet/express-graphql-react-authentication-starter

Repository files navigation

express-graphql-react-authentication Starter

Perfect starter for a any project with NodeJs, express, mongodb, GraphQL in the backend, and React, Apollo JS in the frontend

Authentication is all done. Works with JWT tokens/refreshTokens. SignUp, login, logout, works as a charm. Includes Errors GraphQL side. Also validation in frontend.

Setup: fill the .env file variables. Something like:

  • NODE_ENV=development
  • MONGODB_URI=mongodb://localhost:27017/nameofdb
  • PORT=3000
  • SECRET=mahsdASDHASKDaskdjasdAJSDAs
  • SECRET2=ASDJASDJasDJQURJFIRWGJDgkjdthijdksjfs

Client folder is inside the server with the name of authGraphQLStarter_Client. I did this just for easily upload this project to github. But you have to run both projects separately. Server side is only to handle GraphQL requests. I use Yarn for this, so open the terminal, go to Server folder and run yarn start. Then open a tab, go to Client folder, and also run yarn start.

About

The perfect starter for any project that requires authentication. Server side: Node-express-graphql. Client side: React, Apollo JS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published