0
0
Fork 0

Intial websocket server creation

This commit is contained in:
Oliver-Akins 2020-12-23 12:38:39 -07:00
parent 5b487b2530
commit 8e95c14b6a
2 changed files with 42 additions and 0 deletions

17
server/src/main.ts Normal file
View file

@ -0,0 +1,17 @@
import * as toml from "toml";
import { Logger } from "tslog";
import { readFileSync } from "fs";
import startWebsocket from "./websocket";
let conf: config = toml.parse(readFileSync(`server.toml`, `utf-8`));
export const log: Logger = new Logger({
displayFunctionName: false,
displayLoggerName: false,
displayFilePath: `hidden`,
displayLogLevel: true,
minLevel: conf.log.level,
name: conf.log.name,
});
startWebsocket(conf);