Miss any of our Open RFC calls?Watch the recordings here! »

@cloudseat/micro-serve

1.0.1 • Public • Published

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

Install

npm i @cloudseat/micro-serve

DownloadsWeekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

4.12 kB

Total Files

3

Last publish

Collaborators

  • avatar