Skip to content

Instantly share code, notes, and snippets.

@dupski
Last active July 18, 2017 10:45
Show Gist options
  • Save dupski/6bb5199b17c4ebc23d91f7ae1172f1dc to your computer and use it in GitHub Desktop.
Save dupski/6bb5199b17c4ebc23d91f7ae1172f1dc to your computer and use it in GitHub Desktop.
InversifyJS Route Config Example
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