cloudflare-framework
v1.1.3
Published
๐๐๐ ๅฏนไบ cloudflare ๆๅก็ไบๆฌกๅฐ่ฃ ๐๐๐
Downloads
4
Readme
๐cloudflare-framework
๐ ๅฐ cloudflare ๅธธ็จๅ่ฝ็ๅฐ่ฃ~
๐ Getting Started
่ฏฆ่งcloudflareๅฎ็ฝ -> Wrangler
# ๅฎ่ฃ cloudflare-framework
npm install cloudflare-framework
๐ฉ ๐ป Developing
examples
ไธญๅผๅ
ฅไบๅไธช็คบไพ๏ผไบฆๅฏๅ ้คๆๆไปฃ็ ็ผๅ่ชๅทฑ็้ป่พใ
- โ๏ธ
็ฐกๅฎ็คบไพ
- โ๏ธ
ไธๅ่ฟๅ้กๅ
- โ๏ธ
่ทฏ็ฑ
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;