summaryrefslogtreecommitdiff
path: root/server/src/server.ts
diff options
context:
space:
mode:
authorNick Van Doorn <vandoorn.nick@gmail.com>2019-02-09 01:31:39 -0800
committerNick Van Doorn <vandoorn.nick@gmail.com>2019-02-09 01:31:39 -0800
commitcc3c82a0b2816a4e1601d237a130cf7bae953335 (patch)
treedf65babf3a3870de2bc706b43efd815721a83044 /server/src/server.ts
parent7aa0d4141516cf03e332d70e374f46f35ea09f76 (diff)
Blah
Diffstat (limited to 'server/src/server.ts')
-rw-r--r--server/src/server.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/src/server.ts b/server/src/server.ts
index f80bd2b..459bc69 100644
--- a/server/src/server.ts
+++ b/server/src/server.ts
@@ -1,18 +1,18 @@
-import { Context } from "./context.model";
-import { bindOperations } from "./operations";
-import { DatabaseChange } from "../../lib/database-change.model";
-import WebSocket from "ws";
+import { Context } from './context.model'
+import { bindOperations } from './operations'
+import { DatabaseChange } from '../../lib/database-change.model'
+import WebSocket from 'ws'
-import { Database, Context as CoreContext } from "naive-core";
+import { Database, Context as CoreContext } from 'naive-core'
export const runServer = async (ctx: Context) => {
- const db = new Database();
- await db.init();
- const wss = new WebSocket.Server({ port: ctx.wsPort });
+ const db = new Database()
+ await db.init()
+ const wss = new WebSocket.Server({ port: ctx.wsPort })
bindOperations(ctx, db, async (dbChange: DatabaseChange) => {
for (let client of wss.clients) {
- client.send(dbChange);
+ client.send(dbChange)
}
- });
-};
+ })
+}