Skip to content

serferdinand2/express-middleware-redirect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published