socialement-competents / backathon

0 stars 1 forks source link

Node styled with prettier CircleCI Code coverage with Codecov No license Docker

This repo is functionality complete — PRs and issues welcome!

Getting started

To get the Node server running locally:

Workflow

Code Overview

Dependencies

Application Structure

Authentication !

Requests are authenticated using the Authorization header with a valid JWT. We define two express middlewares in routes/auth.js that can be used to authenticate requests. The required middleware configures the express-jwt middleware using our application's secret and will return a 401 status code if the request cannot be authenticated. The payload of the JWT can then be accessed from req.payload in the endpoint. The optional middleware configures the express-jwt in the same way as required, but will not return a 401 status code if the request cannot be authenticated.