Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/project/servers/init.ts
1447 views
1
/*
2
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
/* Initialize both the hub and browser servers. */
7
8
import initPidFile from "./pid-file";
9
import initAPIServer from "@cocalc/project/http-api/server";
10
import initBrowserServer from "./browser/http-server";
11
import initHubServer from "./hub/tcp-server";
12
13
import { getLogger } from "@cocalc/project/logger";
14
const winston = getLogger("init-project-server");
15
16
export default async function init() {
17
winston.info("Write pid file to disk.");
18
await initPidFile();
19
await initAPIServer();
20
await initBrowserServer();
21
await initHubServer();
22
}
23
24