bun运行时
winget install Oven-sh.Bun安装bun --version 版本bun upgrade 升级bun index.ts 运行bun run start添加以下运行
"scripts": {
"start": "bun run index.ts"
}
index.ts
const server = Bun.serve({
port: 3000,
fetch(req) {
return new Response("Bun中国!");
},
});
console.log(`Listening on http://localhost:${server.port} ...`);bun init 创建项目bun build index.ts --compile --outfile hi打包项目bun add安装bun remove 删除
作者:Yoby 创建时间:2025-12-04 11:24
最后编辑:Yoby 更新时间:2025-12-04 11:43
最后编辑:Yoby 更新时间:2025-12-04 11:43