Get unlimited public & private packages + team-based management with npm Teams.Learn more »

node-cloudworker

1.1.3 • Public • Published

The node-cloudworker is a cloudflare worker shim for node combined with a small webserver, enabling debugging locally. It should not be used in production.

It's most likely not as close to the production environment as https://github.com/dollarshaveclub/cloudworker, which most of the runtime has been borrowed from, but it makes debugging and testing possible.

Installing

Installing via NPM:

npm install node-cloudworker --save

Package Usage

const ncw = require('node-cloudworker');

// Some handlers may depend on the shims
ncw.applyShims();

const handler = event => {
    return new Response('hello', { status: 200 });
};

ncw.start(handler);

```

Install

npm i node-cloudworker

DownloadsWeekly Downloads

13

Version

1.1.3

License

MIT

Unpacked Size

16.9 kB

Total Files

18

Last publish

Collaborators

  • avatar