This repo is about how to create an authentication using JWT on Single Page Applications specifically for React.
The prerequisites are the following:
1.) Mongo Database
Make sure you have mongo database in your system. Setup the API by following the instruction from the link provided.
With the recent react-router v4, rendering of restricted routes are slightly changed.
Wrapping the router into an HOC and add the authentication function.
You can checkout the react-router v4 documentation for more information.
- Contempo repo
- Server API
- run the development environment with
npm run dev
- run isomorphic app with
npm run server
- run tests with
npm run test
ornpm run test:update
- run eslints with
npm run eslint
This implements realtime data updates on component.
Checkout the socket configuration files on the Server API and HomeContainer.js