https://github.com/fooloomanzoo/polyfill-service-express
express middleware for polyfill-service
https://github.com/fooloomanzoo/polyfill-service-express
Last synced: about 1 year ago
JSON representation
express middleware for polyfill-service
- Host: GitHub
- URL: https://github.com/fooloomanzoo/polyfill-service-express
- Owner: fooloomanzoo
- Created: 2017-09-07T17:35:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T20:38:25.000Z (almost 9 years ago)
- Last Synced: 2025-03-18T12:12:53.819Z (over 1 year ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Express middleware for [polyfill-service](https://github.com/Financial-Times/polyfill-service)
Modification of serving API of [polyfill-service](https://polyfill.io) **v2** as an express middleware. It uses your own server and doesn't use metrics or user statistics.
## Usage
The usage is simular to polyfill-service, but you define the route you want to request by using it as an module of express. The request-query should work as for [usage at polyfill.io](https://polyfill.io/v2/docs/usage).
```javascript
const express = require('express');
const app = express();
const polyfills = require('polyfill-service-express')();
app.get(/^\/polyfill(\.\w+)(\.\w+)?/, polyfills);
```
## License
The module is licensed under the terms of the MIT license.
[polyfill service license]: https://github.com/Financial-Times/polyfill-service/blob/master/LICENSE.md
[polyfill service MIT license]: https://github.com/Financial-Times/polyfill-service/blob/master/LICENSE.md
[node.js]: https://nodejs.org/
[npm]: https://www.npmjs.com/
[polyfill-service]: https://polyfill.io
[usage]: https://polyfill.io/v2/docs/usage