Skip to content

Instantly share code, notes, and snippets.

View vintagexav's full-sized avatar
🤓

xavier vintagexav

🤓
View GitHub Profile
@vintagexav
vintagexav / app.js
Created December 29, 2020 10:09 — forked from joshnuss/app.js
Express.js role-based permissions middleware
// 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
@vintagexav
vintagexav / Procfile
Last active August 29, 2015 14:21 — forked from arches/Procfile
monitor: bundle exec ruby monitor.rb

Movies Recommendation:

Music Recommendation: