mobile-redirect
A simple Express middleware to redirect the mobile user.
mobile-redirect will detect if the request is a mobile device. If so, it will redirect the user to your desired path.
Install
npm install --save mobile-redirect
Usage
var mdirect = ; app;
API
mdirect(opt)
- Returns the middleware function that redirects the user to a path.
- Accepts an option object to change the default path.
Options
//default redirectPath: '/mobile'
Test
npm test
Note: Most tests are covered by is-mobile. Also, mobile-redirect will cover most mobile devices where is-mobile fails.