README
Example Usage
require('dotenv').config();
const config = require('config');
const express = require('express');
const authMiddleware = require('@cnscloud/auth-middleware');
const app = express();
app.get('/', authMiddleware, (req, res) => {
res.send(req.user);
});
app.use((err, req, res, next) => {
res.send(err.message);
});
app.listen(config.get('TEST_PORT'));