Path: blob/master/src/packages/project/servers/init.ts
1447 views
/*1* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45/* Initialize both the hub and browser servers. */67import initPidFile from "./pid-file";8import initAPIServer from "@cocalc/project/http-api/server";9import initBrowserServer from "./browser/http-server";10import initHubServer from "./hub/tcp-server";1112import { getLogger } from "@cocalc/project/logger";13const winston = getLogger("init-project-server");1415export default async function init() {16winston.info("Write pid file to disk.");17await initPidFile();18await initAPIServer();19await initBrowserServer();20await initHubServer();21}222324