This repository has been archived on 2021-01-16. You can view files and clone it, but cannot push or open issues/pull-requests.
satyr/src/index.ts

18 lines
602 B
TypeScript
Raw Normal View History

import {init as initRTMP} from "./server";
import {init as initDB} from "./database";
import {init as initHTTP} from "./http";
import {init as clean} from "./cleanup";
import {init as initChat} from "./chat";
import { config } from "./config";
2020-10-17 02:17:10 -05:00
import { execFile } from "child_process";
async function run() {
await initDB();
await clean();
await initHTTP();
config['rtmp']['cluster'] ? execFile(process.cwd()+'/node_modules/.bin/ts-node', [process.cwd()+'/src/cluster.ts']) : await initRTMP();
await initChat();
console.log(`Satyr v${config['satyr']['version']} ready`);
}
run();
export { run };