diff --git a/packages/duckdb/src/data-server.js b/packages/duckdb/src/data-server.js index 184c2400..8172bfff 100644 --- a/packages/duckdb/src/data-server.js +++ b/packages/duckdb/src/data-server.js @@ -19,10 +19,11 @@ export function dataServer(db, { const app = createHTTPServer(handleQuery, rest); if (socket) createSocketServer(app, handleQuery); - app.listen(port); + const server = app.listen(port); console.log(`Data server running on port ${port}`); if (rest) console.log(` http://localhost:${port}/`); if (socket) console.log(` ws://localhost:${port}/`); + return server; } function createHTTPServer(handleQuery, rest) {