This piece of the application allows us to imitate the OAuth flow.
- ExpressJS - Routing
- Axios - Http requests
- Nodemon - Hot reloads
- Dotenv - Environment variable support.
You will need to populate a .env file in the api directory of this project.
OIDC_ISSUER=https://accounts.google.com/
OIDC_REDIRECT_URI=https://localhost:3000
OIDC_CLIENT_ID=<your OAuth client id>
OIDC_CLIENT_SECRET=<your OAuth client secret>
PORT=<the port you want this to run on>
Run npm install
. Once the install has taken place run npm start
you should see a console message saying 'listening on <port defined in .env>'.
Navigate to http://localhost:3001/resource the server should respond:
{"data":[{"id":"id","name":"resource","date":"2020-06-05T15:57:53.720Z"}],"total":1}
Your server should now be available to use with the app (react admin UI) piece of this project.