From 37185ff298428eec6a497092662ef3083ab1639a Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Tue, 20 Mar 2018 09:33:27 +0200 Subject: [PATCH] README: Drop claimed support for using as a connect middleware We use a few of express's enhancements to the req/res objects, so this isn't actually true. Removing this reliance by using the lower-level nodejs http apis is definitely possible and does not add much complexity. Refs: https://github.com/shesek/paypercall/issues/1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 47b5fad..dd36635 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![npm release](https://img.shields.io/npm/v/paypercall.svg)](https://www.npmjs.com/package/paypercall) [![MIT license](https://img.shields.io/github/license/shesek/paypercall.svg)](https://github.com/shesek/paypercall/blob/master/LICENSE) -Charge for HTTP APIs on a pay-per-call basis with Bitcoin and Lightning. Available as an express/connect middleware and as a reverse proxy. +Charge for HTTP APIs on a pay-per-call basis with Bitcoin and Lightning. Available as an express middleware and as a reverse proxy. Powered by :zap: [Lightning Charge](https://github.com/ElementsProject/lightning-charge). @@ -17,7 +17,7 @@ $ npm install paypercall ### As a middleware -`paypercall` can be used as an express/connect middleware to charge payments directly in your node.js app. +`paypercall` can be used as an express middleware to charge payments directly in your node.js apps. Below is an example app that charges 0.1 USD to send out tweets: #### app.js @@ -128,7 +128,7 @@ Returns a new payment middleware factory. `options` can contain the following fi const payware = pay(amount[, currency]) ``` -Returns an express/connect middleware that requires a payment of `amount` units of `currency` +Returns an express middleware that requires a payment of `amount` units of `currency` (or the default currency if none provided) before letting requests pass through. Can be used as following: