Closed jgutix closed 8 years ago
duplicate of #133
@mbroadst do think that using app.constructor.name instead of app.name would be fine? Because restify always return 'Server' meanwhile express returns 'EventEmitter', if so I can prepare a PR to address this.
@jgutix yeah I generally think it's best-effort here, so whatever works best works :smile:
I would say there are two ideals here:
Let's say I initialize my server like this:
If any of my resources enables the
delete
controller it will fail with this error:This is happening because https://github.com/dchester/epilogue/blob/master/lib/Controllers/base.js#L73 is specifically comparing
app.name === 'restify'
I think if there's other way to detect automatically that restify is used would be great, otherwise an option in the
epilogue.initialize
method that manually set that you are using restify would be a good solution too. Even tough this is not a big deal or issue, it's just not easy to tell what is the problem based on the error returned.