Created
September 13, 2017 11:48
-
-
Save cannap/efd322c02127e1b35393891020cbc6d5 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 { ServiceProvider } = require('@adonisjs/fold') | |
| class BoomProvider extends ServiceProvider { | |
| register () { | |
| this.app.bind('Adonis/Middleware/Boom', app => { | |
| const BoomMiddleware = require('./middleware') | |
| return new BoomMiddleware() | |
| }) | |
| } | |
| } | |
| module.exports = BoomProvider |
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
| class BoomMiddleware { | |
| async handle (request, response) { | |
| console.log('wtf') | |
| } | |
| } | |
| module.exports = BoomMiddleware |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment