@cloudseat/micro-serve

A static serve middleware for ZEIT's Micro.

Usage no npm install needed!

<script type="module">
  import cloudseatMicroServe from 'https://cdn.skypack.dev/@cloudseat/micro-serve';
</script>

README

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