aboutsummaryrefslogtreecommitdiff
path: root/src/server/session_manager/config.ts
blob: ebbd999c6121e3d5340bca47d17d948cfbe6183d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { resolve } from 'path';
import { yellow } from "colors";

export const latency = 10;
export const ports = [1050, 4321];
export const onWindows = process.platform === "win32";
export const heartbeat = `http://localhost:1050/serverHeartbeat`;
export const recipient = "samuel_wilkins@brown.edu";
export const { pid, platform } = process;

/**
 * Logging
 */
export const identifier = yellow("__session_manager__:");

/**
 * Paths
 */
export const logPath = resolve(__dirname, "./logs");
export const crashPath = resolve(logPath, "./crashes");

/**
 * State
 */
export enum SessionState {
    STARTING = "STARTING",
    INITIALIZED = "INITIALIZED",
    LISTENING = "LISTENING",
    AUTOMATICALLY_RESTARTING = "CRASH_RESTARTING",
    MANUALLY_RESTARTING = "MANUALLY_RESTARTING",
    EXITING = "EXITING",
    UPDATING = "UPDATING"
}