Last active
July 18, 2017 10:45
-
-
Save dupski/6bb5199b17c4ebc23d91f7ae1172f1dc to your computer and use it in GitHub Desktop.
InversifyJS Route Config Example
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
import { container } from '../ioc/inversify.config'; | |
import { TYPES } from '../ioc/types'; | |
import { IMyAppsController } from '../controllers/MyAppsController'; | |
const server = new Hapi.Server(); | |
server.route({ | |
method: 'GET', | |
path: '/apps', | |
handler: (request, reply) => { | |
container.get(TYPES.IMyAppsController).myAppsList(request, reply); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment