summaryrefslogtreecommitdiff
path: root/src/ircd.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ircd.mjs')
-rw-r--r--src/ircd.mjs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/ircd.mjs b/src/ircd.mjs
index af4d280..1924350 100644
--- a/src/ircd.mjs
+++ b/src/ircd.mjs
@@ -1,13 +1,19 @@
+import fs from "node:fs";
import net from "node:net";
+import * as hero from "./hero.mjs";
+
+
const server = net.createServer(socket => {
socket.write("olar\r\n");
socket.pipe(socket);
});
-export const app = async udsPath => {
- await db.init();
- server.listen(udsPath, () => {
- console.log("I'm ircd.");
+export const app = async path => {
+ if (fs.existsSync(path)) {
+ fs.unlinkSync(path);
+ }
+ server.listen(path, () => {
+ hero.log.info({ type: "starting-server", path });
});
};