Skip to content

Commit

Permalink
feat: return dataServer on creation (#553) (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhkeller authored Oct 8, 2024
1 parent bce92a7 commit d0319d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/duckdb/src/data-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d0319d5

Please sign in to comment.