Skip to content

Commit

Permalink
Move package usage higher
Browse files Browse the repository at this point in the history
  • Loading branch information
kotx committed May 24, 2022
1 parent 5e216f5 commit 6bb82ec
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ wrangler publish # or `npm run deploy`
4. Update `wrangler.toml` as needed (this will trigger the workflow)
5. (Optionally) set the worker route in the Cloudflare dashboard to use the Cache API

## Using as a package

You may use this worker's functionality as a package by installing and importing [`@kotx/render`](https://www.npmjs.com/package/@kotx/render):
```sh
npm install @kotx/render
```
Usage:
```js
import render from "@kotx/render";
render.fetch(req, env, ctx);
```

## Development

Install deps:
Expand All @@ -63,15 +75,3 @@ To launch the development server:
```sh
npm run dev
```

## Using as a package

You may use this worker's functionality as a package by installing and importing [`@kotx/render`](https://www.npmjs.com/package/@kotx/render):
```sh
npm install @kotx/render
```
Usage:
```js
import render from "@kotx/render";
render.fetch(req, env, ctx);
```

0 comments on commit 6bb82ec

Please sign in to comment.