Skip to content

Commit 915c272

Browse files
committed
Moved test runner into shared npm module
1 parent 146955a commit 915c272

File tree

6 files changed

+9
-231
lines changed

6 files changed

+9
-231
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@jsr:registry=https://npm.jsr.io

bun.lockb

417 Bytes
Binary file not shown.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
"start": "bun run --logLevel=debug dist/server.js",
1212
"build": "bun build src/server.ts --outdir ./dist"
1313
},
14-
"type": "module"
14+
"type": "module",
15+
"dependencies": {
16+
"@regexplanet/common": "npm:@jsr/regexplanet__common"
17+
}
1518
}

src/runTest.ts

Lines changed: 0 additions & 209 deletions
This file was deleted.

src/server.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Server } from "bun";
2-
import type { TestInput } from "./types";
3-
import { runTest } from "./runTest";
2+
import type { TestInput } from "@regexplanet/common";
3+
import { runTest } from "@regexplanet/common";
44

55
Bun.serve({
66
development: process.env.NODE_ENV !== "production",
@@ -13,10 +13,9 @@ Bun.serve({
1313
},
1414
hostname: process.env.HOSTNAME || "0.0.0.0",
1515
idleTimeout: 15,
16-
port: process.env.PORT || 4000,
16+
port: process.env.PORT || 5000,
1717
static: {
18-
//LATER: "/": Response.redirect("https://www.regexplanet.com/advanced/bun/index.html", 302),
19-
"/": new Response("running!"),
18+
"/": new Response(`Running Bun v${Bun.version}`),
2019

2120
"/favicon.ico": new Response(await Bun.file("static/favicon.ico").bytes(), {
2221
headers: {

src/types.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)