Skip to content

Commit

Permalink
Comment for route
Browse files Browse the repository at this point in the history
  • Loading branch information
corrideat committed Jan 6, 2025
1 parent 60fec6f commit e7b6bf6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ const staticServeConfig = {
redirect: isCheloniaDashboard ? '/dashboard/' : '/app/'
}

// We define a `Proxy` for route so that we can use `route.VERB` syntax for
// defining routes instead of calling `server.route` with an object, and to
// dynamically get the HAPI server object from the `SERVER_INSTANCE`, which is
// defined in `server.js`.
const route = new Proxy({}, {
get: function (obj, prop) {
return function (path: string, options: Object, handler: Function | Object) {
Expand Down

0 comments on commit e7b6bf6

Please sign in to comment.