Skip to content

Instantly share code, notes, and snippets.

@renatoargh
Last active January 2, 2018 19:53
Show Gist options
  • Save renatoargh/443516bacef3004576e26c93d00745be to your computer and use it in GitHub Desktop.
Save renatoargh/443516bacef3004576e26c93d00745be to your computer and use it in GitHub Desktop.
const express = require('express')
const sequelizeMiddleware = require('./middlewares/sequelize')
const authMiddleware = require('./middlewares/auth')
const app = express()
app.use(sequelizeMiddleware()) // 1. Sequelize startup
app.use(authMiddleware) // 2. Auth and schema management
app.get('/tasks', async (req, res, next) => {
// 3. Here we must query the database and
// list all the tasks for the logged user
})
app.listen(9090, () => {
console.log('data-isolation-example running on port 9090')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment