Skip to content

Commit

Permalink
Testing compatibility with Express Zod API v21.
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail committed Nov 16, 2024
1 parent 1f2e946 commit 642d5a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions tests/compat/express-zod-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@ import { createConfig, createServer } from "express-zod-api";
import { Server } from "socket.io";
import { attachSockets, createSimpleConfig } from "zod-sockets";

const serverConfig = createConfig({
server: { listen: 8090 },
cors: false,
logger: { level: "debug", color: true },
});
const serverConfig = createConfig({ http: { listen: 8090 }, cors: false });

const { httpServer, logger } = await createServer(serverConfig, {});
const { servers, logger } = await createServer(serverConfig, {});

const socketsConfig = createSimpleConfig();

const io = new Server();
await attachSockets({
target: httpServer,
target: servers.pop()!,
config: socketsConfig,
actions: [],
io,
Expand Down
2 changes: 1 addition & 1 deletion tests/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"zod-sockets": "link:../..",
"express": "^5.0.0",
"express-zod-api": "^20.14.0",
"express-zod-api": "^21.0.0-beta.3",
"http-errors": "^2.0.0"
}
}

0 comments on commit 642d5a0

Please sign in to comment.