随笔分类 -  bun

摘要:index.ts: // this becomes an internal file path import html from "./index.html" with { type: "file" }; import { file } from "bun"; export default { fe 阅读全文
posted @ 2024-07-21 23:20 卓能文 阅读(9) 评论(0) 推荐(0) 编辑
摘要:import { Elysia } from 'elysia' const app = new Elysia() .get('/ok', function* () { yield 1 yield 2 yield 3 }) .listen(3000) 阅读全文
posted @ 2024-07-21 09:10 卓能文 阅读(4) 评论(0) 推荐(0) 编辑
摘要:server.ts: import { serve } from "bun"; const id = Math.random().toString(36).slice(2); serve({ port: process.env.PORT || 8080, development: false, // 阅读全文
posted @ 2024-07-21 08:28 卓能文 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示