aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authoreeng5 <eleanor.eng5@gmail.com>2019-11-19 17:49:37 -0500
committereeng5 <eleanor.eng5@gmail.com>2019-11-19 17:49:37 -0500
commit7347f1eb7320e5e95f87c64b3222e4b4c1593be5 (patch)
tree180b80e3f32cb8d9499d1f1568cdee593abf799c /src/server/index.ts
parentf194abe2a54158bb041e1e0e7cfa6e22c669629f (diff)
parent8b6f70cd0ddac6d2669c3b0624d59a866737497c (diff)
Merge branch 'server_refactor' of https://github.com/browngraphicslab/Dash-Web into server_refactor
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 773b84403..01ebf0ac1 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -13,11 +13,12 @@ import UtilManager from './ApiManagers/UtilManager';
import SearchManager from './ApiManagers/SearchManager';
import UserManager from './ApiManagers/UserManager';
import { WebSocket } from './Websocket/Websocket';
-import DownloadManager from './ApiManagers/ExportManager';
+import DownloadManager from './ApiManagers/DownloadManager';
import { GoogleCredentialsLoader } from './credentials/CredentialsLoader';
import DeleteManager from "./ApiManagers/DeleteManager";
import PDFManager from "./ApiManagers/PDFManager";
import UploadManager from "./ApiManagers/UploadManager";
+import { log_execution } from "./ActionUtilities";
import GeneralGoogleManager from "./ApiManagers/GeneralGoogleManager";
import GooglePhotosManager from "./ApiManagers/GooglePhotosManager";
@@ -55,8 +56,7 @@ async function preliminaryFunctions() {
* with the server
*/
function routeSetter(router: RouteManager) {
- // initialize API Managers
- [
+ const managers = [
new UserManager(),
new UploadManager(),
new DownloadManager(),
@@ -66,7 +66,10 @@ function routeSetter(router: RouteManager) {
new UtilManager(),
new GeneralGoogleManager(),
new GooglePhotosManager(),
- ].forEach(manager => manager.register(router));
+ ];
+
+ // initialize API Managers
+ managers.forEach(manager => manager.register(router));
// initialize the web socket (bidirectional communication: if a user changes
// a field on one client, that change must be broadcast to all other clients)
@@ -103,6 +106,6 @@ function routeSetter(router: RouteManager) {
}
(async function start() {
- await preliminaryFunctions();
+ await log_execution("starting execution of preliminary functions", "completed preliminary functions", preliminaryFunctions);
await initializeServer({ listenAtPort: 1050, routeSetter });
})();