fnorby777's picture
Minor changes
6338915 verified
Raw
History Blame Contribute Delete
1.37 kB
import { WebServer } from "./server";
import { DEFAULT_CONFIG } from "./config";
async function main(): Promise<void> {
console.clear();
// Fixed ASCII Art alignment
console.log(`
╔═══════════════════════════════════════════════════════════╗
β•‘ β•‘
β•‘ 🎬 TikTok Live Studio - Web Interface β•‘
β•‘ β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
`);
// Load default config
const config = { ...DEFAULT_CONFIG };
const server = new WebServer(config);
const onSigint = (): void => {
console.log("\n\nπŸ›‘ Shutting down server...");
server.getManager().stopAll();
console.log("βœ… All downloads stopped");
process.exit(0);
};
process.on("SIGINT", onSigint);
process.on("SIGTERM", onSigint);
try {
await server.start(3000);
await new Promise(() => {});
} catch (err) {
console.error("❌ Server error:", err);
process.exitCode = 1;
}
}
main();