1.0.1 • Published 5 years ago
@cloudseat/micro-serve v1.0.1
A static serve middleware for ZEIT's Micro.
Installation
npm install @cloudseat/micro-serve
Usage
const serve = require('@cloudseat/micro-serve')
// without rewrites
module.exports = serve
// with rewrites
module.exports = (req, res) => {
return serve(req, res, {
'/a': '/pages/a.html',
'/b': '/pages/b.html'
})
}