Last active
May 18, 2016 09:18
-
-
Save stewhouston/47351f03033ade89600132c45536c7e5 to your computer and use it in GitHub Desktop.
Express/TypeScript Manbearpig
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
var RouteController = require('./lib/RouteController'); | |
@RouteController({ | |
providers: ['express', 'mongoose'] | |
}) | |
class Dota2Controller { | |
baseUrl:string = '/dota2'; | |
routes:any; | |
constructor(private express, private mongoose) { | |
this.routes = express.Router(); | |
this.routes.get('/', (req, res) => { | |
res.status(200).send('yes it works'); | |
}); | |
this.routes.post('/submit', (req, res) => { | |
return res.render('foobar'); | |
}); | |
} | |
} | |
module.exports = Dota2Controller; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment