This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fa-500px": "500px", | |
"fa-adjust": "Adjust", | |
"fa-adn": "Adn", | |
"fa-align-center": "Align Center", | |
"fa-align-justify": "Align Justify", | |
"fa-align-left": "Align Left", | |
"fa-align-right": "Align Right", | |
"fa-amazon": "Amazon", | |
"fa-ambulance": "Ambulance", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |