aboutsummaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authorcjd242018-04-26 07:02:02 +0100
committercjd242018-04-26 07:02:02 +0100
commit025b4833009255baba8a24be4dde78c0f0832fb2 (patch)
tree22fa76dfbd6cf33669a280373dacc74c35c0e7d3 /src/index.ts
parentfixing czi live tiles and adding support for scn live tiles (diff)
parentMerge branch 'trh/gets' of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/projec... (diff)
downloadmedicine-025b4833009255baba8a24be4dde78c0f0832fb2.tar.gz
medicine-025b4833009255baba8a24be4dde78c0f0832fb2.zip

Merge branch ‘trh/gets’ of https://gitlab.cs.st-andrews.ac.uk/cs3099group-be-4/project-code into trh/gets

Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts
index 4120fef..d26c867 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,5 +1,6 @@
import * as fs from 'fs-extra';
import { logger } from './logger';
+import { RemoteResolver, remote } from './profiler';
logger.info('Starting up server');
logger.info('Creating necessary directories');
@@ -153,9 +154,12 @@ async function reset(): Promise<void> {
username: 'hafeez'
}
});
-
}
+remote('Reset DB', (res: RemoteResolver): void => {
+ reset().then(() => res({ success: true }));
+});
+
// tslint:disable:no-floating-promises
(async(): Promise<void> => {
try {
@@ -166,7 +170,7 @@ async function reset(): Promise<void> {
process.exit(1);
}
- //await reset();
+ // await reset();
logger.info('Booting ExpressJS server');
app.listen(port, (err: Error) => {