Skip to content

Commit

Permalink
chore: bumping hono/node-server to support ipv6
Browse files Browse the repository at this point in the history
See context here: ponder-sh#1146

Upstream change to hono/node-server was included @ honojs/node-server#206

This PR bumps the version of hono/node-server to include the upstream change. I also added a test to ensure ipv6 works, which should help avoid future regressions as well!
  • Loading branch information
sinasab committed Oct 10, 2024
1 parent 2824b65 commit 6d50581
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/stupid-cooks-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ponder/core": patch
---

Bumping hono/node-server to support ipv6
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@escape.tech/graphql-armor-max-aliases": "^2.3.0",
"@escape.tech/graphql-armor-max-depth": "^2.2.0",
"@escape.tech/graphql-armor-max-tokens": "^2.3.0",
"@hono/node-server": "^1.12.2",
"@hono/node-server": "^1.13.2",
"@ponder/utils": "workspace:*",
"abitype": "^0.10.2",
"better-sqlite3": "^11.1.2",
Expand Down
36 changes: 36 additions & 0 deletions packages/core/src/server/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,42 @@ test("port", async (context) => {
await cleanup();
});

test("listens on ipv4", async (context) => {
const { database, cleanup } = await setupDatabaseServices(context);

const server = await createServer({
common: context.common,
app: new Hono(),
routes: [],
schema: {},
database,
});

const response = await fetch(`http://localhost:${server.port}/health`);
expect(response.status).toBe(200);

await server.kill();
await cleanup();
});

test("listens on ipv6", async (context) => {
const { database, cleanup } = await setupDatabaseServices(context);

const server = await createServer({
common: context.common,
app: new Hono(),
routes: [],
schema: {},
database,
});

const response = await fetch(`http://[::1]:${server.port}/health`);
expect(response.status).toBe(200);

await server.kill();
await cleanup();
});

test("not ready", async (context) => {
const { database, cleanup } = await setupDatabaseServices(context);

Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d50581

Please sign in to comment.