# deviate
Redirecting middlware for express or node.js
- supports ert syntax
- supports a function that takes
req
and returns the path - uses
res.redirect
if it's used with express - falls back to manually writing the header elsewhere
Usage
var deviate = ; var express = ;var app = ; app; app;app; app; app;
API
deviate([status,] path)
Deviate takes an optional status (which defaults to 302) and a path or function. It then returns a middleware function which takes req
and res
and redirects res
to the path.
License
MIT