Open ClementParis016 opened 6 years ago
Restify's createServer method allows a name option to customize the server name.
createServer
name
If it's value is changed from "restify", the following check would think it's running under Express: https://github.com/dchester/epilogue/blob/d46def3dfc7b9dd7b25303b124bb337499cc9f1f/lib/Controllers/base.js#L73-L74
"restify"
And then the server would crash because app.delete is not a function in Restify.
app.delete is not a function
This PR takes a safer approach by simply checking if app.delete is undefined.
app.delete
undefined
Hello, please consider contributing this change to finale, a sequelize 4.x fork of epilogue
Restify's
createServer
method allows aname
option to customize the server name.If it's value is changed from
"restify"
, the following check would think it's running under Express: https://github.com/dchester/epilogue/blob/d46def3dfc7b9dd7b25303b124bb337499cc9f1f/lib/Controllers/base.js#L73-L74And then the server would crash because
app.delete is not a function
in Restify.This PR takes a safer approach by simply checking if
app.delete
isundefined
.