diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-02-11 20:25:15 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-02-11 20:25:15 -0500 |
commit | 867fd2bffb67be06e889d3ac0fb6603bc8c4d92a (patch) | |
tree | 6b045d218d8211b5e0ac9f2b7fdb9e45dfe30515 /src/server/index.ts | |
parent | 448f8880b50dc50090a596cafaf68d2f444ce3db (diff) |
asdkjfl
Diffstat (limited to 'src/server/index.ts')
-rw-r--r-- | src/server/index.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index 0f2409fbb..f5a0fcfe2 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -10,6 +10,7 @@ import { Socket } from 'socket.io'; import { Utils } from '../Utils'; import { ObservableMap } from 'mobx'; import { FIELD_ID, Field } from '../fields/Field'; +import { Database } from './database'; const config = require('../../webpack.config') const compiler = webpack(config) const port = 1050; // default port to listen @@ -55,6 +56,7 @@ server.on("connection", function (socket: Socket) { function barReceived(guid: String) { clients[guid.toString()] = new Client(guid.toString()); + Database.Instance.print() } function addDocument(document: Document) { @@ -62,6 +64,7 @@ function addDocument(document: Document) { } function setField(newValue: SetFieldArgs) { + Database.Instance.update(newValue.field, newValue.value) if (FieldStore.get(newValue.field)) { FieldStore.get(newValue.field)!.TrySetValue(newValue.value); } |