JSPM

  • Created
  • Published
  • Downloads 75
  • Score
    100M100P100Q74353F
  • License MIT

An Express.js adapter for reSolve API handlers.

Package Exports

  • resolve-api-handler-express

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resolve-api-handler-express) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

resolve-api-handler-express

npm version

This package is a Api Handler adapter for Express.

Usage

import express from 'express'
import wrapApiHandler from 'resolve-api-handler-express'

const handler = async (req, res) => {
  res.end('Hello World!')
}

const app = express()

app.use('/my-handler', wrapApiHandler(handler))

app.listen(3000)

Analytics