An open API service indexing awesome lists of open source software.

https://github.com/explosion-scratch/smart404

Make your error pages smart! Redirect users who made a typo automatically!
https://github.com/explosion-scratch/smart404

Last synced: 3 days ago
JSON representation

Make your error pages smart! Redirect users who made a typo automatically!

Awesome Lists containing this project

README

        

# smart404
Make your error pages smart! Redirect users who made a typo automatically!

# Usage:
```js
const smart404 = require("smart404");
app.use(smart404(app, {
distance: .8, //80% or more similar to an actual route.
methods: ["GET"], //Methods to redirect
status: 302, //Status to send
ignoreRoutes: [], //Ignore these routes
}));//Must go BEFORE any other routes
```
It's that simple!