1.0.1 • Published 2 years ago
@serferdinand2/express-middleware-redirect v1.0.1
Express Middleware Redirect
Redirecting middleware for express.js
redirectMiddleware ⇒
Checks if the original URL is in the redirect data and redirects to the value if it is.
Returns: Function
Param | Type | Description |
---|---|---|
redirectData | String | Object | Object or path to JSON file containing redirect data. |
Example
import redirectMiddleware from '@serferdinand2/express-middleware-redirect'
app.use(redirectMiddleware('./path/to/redirects.json'));