diff options
author | Stanley Yip <stanley_yip@brown.edu> | 2020-05-23 22:27:06 -0700 |
---|---|---|
committer | Stanley Yip <stanley_yip@brown.edu> | 2020-05-23 22:27:06 -0700 |
commit | 577e93f075e44277254f096ae8bf769a239ebd33 (patch) | |
tree | 3b4562befa8124fb5b4d6294e3a94529a27fe30c /src/client/views/Main.tsx | |
parent | 1113da5f2db22bd2b2b457b1f5b183d7f1f2e68d (diff) | |
parent | 19ababdb6098ac36358c86e43ad63ab3066b4663 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r-- | src/client/views/Main.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 17c001971..6878658a8 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -5,12 +5,16 @@ import * as ReactDOM from 'react-dom'; import * as React from 'react'; import { DocServer } from "../DocServer"; import { AssignAllExtensions } from "../../extensions/General/Extensions"; +import { Networking } from "../Network"; AssignAllExtensions(); +export let resolvedPorts: { server: number, socket: number }; + (async () => { const info = await CurrentUserUtils.loadCurrentUser(); - DocServer.init(window.location.protocol, window.location.hostname, 4321, info.email); + resolvedPorts = JSON.parse(await Networking.FetchFromServer("/resolvedPorts")); + DocServer.init(window.location.protocol, window.location.hostname, resolvedPorts.socket, info.email); await Docs.Prototypes.initialize(); if (info.id !== "__guest__") { // a guest will not have an id registered |