This repository was archived by the owner on Nov 22, 2025. It is now read-only.
Release v0.3.6 - 2017-11-07
Added
-
New option:
ignorePathsIf the incoming request path is contains in
ignorePaths, dynapi will pass the request to the
next middleware directly.It's useful when you serving API with resources. Here is an example: Using with Nuxt.js and
express-session -
Now you can send headers in middlewares as expected. (Like using
redirect)
Changed
-
Now errors thrown by route files are
silentin default whenoptions.dev === false(or says
process.env.NODE_ENV === 'production')You can still forcing silent or not by providing it in Error object, for example:
// >check-post-data.js export default (req, res, next) => { if (typeof req.body.username === 'string') { return next() } else { return next({ silent: true, status: 400 }) // Always silent even in dev-mode } }
Fixed
- Fix middlewares do not used when request path not exists in
routesDirsinceloose-modeadded