Request handlers & error response factory!

This commit is contained in:
garrettmills
2020-07-29 22:01:20 -05:00
parent 48f5da1747
commit a04f083dbb
11 changed files with 240 additions and 22 deletions

View File

@@ -1,5 +1,13 @@
import Controller from "../../../lib/src/http/Controller.ts";
import Controller from '../../../lib/src/http/Controller.ts'
export default class TestController extends Controller {
get_home(req: any) {
req.response.body = 'Hello!'
}
get_user_home(req: any) {
throw new Error('Hello, world!')
}
create_user_home(req: any) {}
}