fabrix-app / fabrix

Strongly Typed Modern Web Application Framework for Node.js and Browsers
Other
107 stars 5 forks source link

AssertionError [ERR_ASSERTION]: Missing or undefined handler on app start up #29

Closed pmould closed 5 years ago

pmould commented 5 years ago

Issue Description

When creating a new fabrix app using the fabrix-cli@1.5.0. and set up a Controller

export class TestController extends Controller {
  hello (request, reply) {
    return '<h1>Hello Fabrix</h1>'
  }
}
export const routes = {
  'hello': {
    'GET': {
      handler: 'TestController.hello'
    }
  }
}

I get the following error on npm start:

(node:24308) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError [ERR_ASSERTION]: Missing or undefined handler: GET /hello

Environment

pmould commented 5 years ago

Hi, this is can be closed. I was messing around with the Fabrix.js compiled source code in my node_modules in the past and forgot to reset it. ;)

scott-wyatt commented 5 years ago

Cheers! However, this does seem to be an error that should be handled by spool-router, so I'm opening https://github.com/fabrix-app/spool-router/issues/16 good catch!