diff options
author | EuAndreh <eu@euandre.org> | 2023-11-15 10:50:30 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-11-15 16:16:30 -0300 |
commit | af5e7495f3993c52573432cadde12169d5c05e62 (patch) | |
tree | 002fc20e6f12eac71c21c6eccc48bf59e7180274 /src/ircd.js | |
parent | src/napi-sqlite.c: Add Node-API PoC (diff) | |
download | papod-af5e7495f3993c52573432cadde12169d5c05e62.tar.gz papod-af5e7495f3993c52573432cadde12169d5c05e62.tar.xz |
Add support for multi-file C project
- have dynamic discovered dependencies via `mkdeps.hs`, and also move
the listing of JavaScript files to it.
- copy over stub C files for setting up the project skeleton.
Diffstat (limited to 'src/ircd.js')
-rw-r--r-- | src/ircd.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ircd.js b/src/ircd.js index affc986..6a02bd6 100644 --- a/src/ircd.js +++ b/src/ircd.js @@ -1,11 +1,13 @@ const net = require("node:net"); +const db = require("./db.js"); const server = net.createServer(socket => { socket.write("olar\r\n"); socket.pipe(socket); }); -const app = udsPath => { +const app = async udsPath => { + await db.init(); server.listen(udsPath, () => { console.log("I'm ircd."); }); |