1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

create bun

This commit is contained in:
Nebel 2022-07-07 14:41:34 +09:00
parent f4ec67dbc4
commit b57aed9359
5 changed files with 30 additions and 0 deletions

BIN
bun/bun.lockb Executable file

Binary file not shown.

7
bun/hello.test.ts Normal file
View file

@ -0,0 +1,7 @@
import { test, expect } from "bun:test";
import hello from "./hello";
test("response", async () => {
const res = hello.fetch(new Request(""));
expect(await res.text()).toBe("Hello, World!");
});

6
bun/hello.ts Normal file
View file

@ -0,0 +1,6 @@
export default {
port: 3000,
fetch(request: Request) {
return new Response("Hello, World!");
},
};

9
bun/package.json Normal file
View file

@ -0,0 +1,9 @@
{
"name": "bun-example",
"scripts": {
"test": "bun wiptest"
},
"dependencies": {
"bun-types": "^0.0.83"
}
}

8
bun/tsconfig.json Normal file
View file

@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"lib": ["esnext"],
"types": ["bun-types"]
}
}