Last active
January 2, 2018 19:53
-
-
Save renatoargh/443516bacef3004576e26c93d00745be to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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