aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-02-11 20:25:15 -0500
committeryipstanley <stanley_yip@brown.edu>2019-02-11 20:25:15 -0500
commit867fd2bffb67be06e889d3ac0fb6603bc8c4d92a (patch)
tree6b045d218d8211b5e0ac9f2b7fdb9e45dfe30515 /src/server/index.ts
parent448f8880b50dc50090a596cafaf68d2f444ce3db (diff)
asdkjfl
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts3
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);
}