realm-router
Version:
Realm router is a bleeding edge restful framework (ec7 + decorators), based on realm dependency injection.
29 lines (21 loc) • 544 B
JavaScript
"use realm backend";
import route, cors from realm.router.decorators;
import Session as sess, Permissions from realm.router.test;
@route(/^\/(?!api|_realm_|favicon.ico).*/)
class MainRouter {
@Permissions()
static get($params, $res, $query, $permissions, $body) {
return class {
setPukka() {
return 1;
}
otherStuff() {
//return this.$kill()
//return $res.send("hello")
}
}
}
static put($params, $query, $body) {
return $params;
}
}