# cloudflare-framework

> 🎉🎉🎉 对于 cloudflare 服务的二次封装 🎉🎉🎉

Latest version **1.1.3** (published 2022-12-26) · ISC license · 0 weekly downloads

## Install

```sh
npm install cloudflare-framework
pnpm add cloudflare-framework
yarn add cloudflare-framework
bun add cloudflare-framework
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-12-26 |
| First published | 2022-12-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ato-z |
| Keywords | cloudflare, serverless, router |

## Links

- npm: https://www.npmjs.com/package/cloudflare-framework
- Homepage: https://github.com/ato-z/cloudflare-framework#readme
- Issues: https://github.com/ato-z/cloudflare-framework/issues
- npm.io page: https://npm.io/package/cloudflare-framework

## Alternatives

- [express-promise-router](https://npm.io/package/express-promise-router.md) — 736.1K weekly downloads
- [next-usequerystate](https://npm.io/package/next-usequerystate.md) — 29.8K weekly downloads
- [@bitkyc08/opencodex](https://npm.io/package/@bitkyc08/opencodex.md) — 4.6K weekly downloads
- [lynkr](https://npm.io/package/lynkr.md) — 575 weekly downloads
- [baremetal.js](https://npm.io/package/baremetal.js.md) — 42 weekly downloads

## Recent versions

- 1.1.3 (latest) — 2022-12-26
- 1.1.2 — 2022-12-26
- 1.1.1 — 2022-12-26
- 1.0.1 — 2022-12-26
- 1.0.0 — 2022-12-26

## README

# 🎊cloudflare-framework
🎃 對 [cloudflare](https://dash.cloudflare.com/) 常用功能的封裝~

## 🔋 Getting Started
详见cloudflare官网 -> [Wrangler](https://github.com/cloudflare/wrangler)
```sh
# 安裝 cloudflare-framework 
npm install cloudflare-framework
```

## 👩 💻 Developing
[`examples`](./examples) 中引入了各个示例，亦可删除所有代码编写自己的逻辑。

 - ✏️ [`簡單示例`](./examples/simple)
 - ✏️ [`不同返回類型`](./examples/content-type)
 - ✏️ [`路由`](./examples/router/)

```typescript
import { App, type Context } from 'cloudflare-framework';

const app = new App();

app.use(async (ctx: Context) => {

    const prop = await ctx.toProp();
    console.log('當前請求參數', prop)
    
    // return 的数据将输出到浏览器
    return 'hello world';
});


// 最后需要将 实例导出
export default app;
```

---
_Source: https://npm.io/package/cloudflare-framework · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
