JSPM

@turinggroup/serverless-express-custom-domain-middleware

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 473
  • Score
    100M100P100Q111288F
  • License ISC

matches request urls when basepath in api-gateway and custom domain mismatch

Package Exports

  • @turinggroup/serverless-express-custom-domain-middleware

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 (@turinggroup/serverless-express-custom-domain-middleware) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Serverless Express Custom Domain Middleware

install

npm install @turinggroup/serverless-express-custom-domain-middleware

usage

const customDomainReroute = require('@turinggroup/serverless-express-custom-domain-middleware').customDomainReroute;

app.use(customDomainReroute);

to call custom function when path is rerouted

const customDomainReroute = require('@turinggroup/serverless-express-custom-domain-middleware');
const rerouter = customDomainReroute.setup({
  onRouted: (originalPath, routedPath) => {
    // do something here
  }
});

app.use(rerouter);