Skip to content

Instantly share code, notes, and snippets.

@nartc
Created February 23, 2018 14:13
Show Gist options
  • Save nartc/8500a17455d79e6544cc046f6369f841 to your computer and use it in GitHub Desktop.
Save nartc/8500a17455d79e6544cc046f6369f841 to your computer and use it in GitHub Desktop.
export class UserRouter {
router: Router;
userController: UserController;
userModel: User;
constructor() {
this.router = Router();
this.user = new User();
this.userController = new UserController(this.user);
this.routes();
}
routes() {
this.router.post('/register', this.userController.register);
this.router.post('/login', this.userController.login);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment