3.0.0 • Published 4 years ago

servie-mount v3.0.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
4 years ago

Servie Mount

NPM version NPM downloads Build status Test coverage

Mount Servie middleware on a path prefix.

Installation

npm install servie-mount --save

Usage

import { mount, path, params, originalUrl } from "servie-mount";
import { compose } from "throwback";
import { Response } from "servie";

const fn = req => {
  console.log(req[path]); // Get mounted path.
  console.log(req[params]); // Get mounted params.
  console.log(req[originalUrl]); // Get original URL string.

  return new Response("hello world");
};

const app = compose([mount("/hello", fn)]);

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

Apache 2.0

3.0.0

4 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago