This is an application that models the implementation of JWT with the following:
frontend:
- react-router v4
- react
- redux
- redux-form v6.7
- material-ui
backend:
- express.js
- MongoDB
- passport.js
-
Start a MongoDB server running on port
27017
-
In
/server
, create a new file calledconfig.js
to hold your JWTsecretOrKey
. Here is an example:/* /server/config.js */ module.exports = { secret: 'sdajkljdsalkj8932904ujaskfs' }
-
Navigate to
/server
in your terminal- run
npm install
. - run
npm run dev
to start the server
- run
-
Navigate to
/client
in a new terminal window- run
yarn install
- run
yarn start
to start the webpack dev server
- run
-
Navigate to
localhost:3000
in your browser