mirror of
https://github.com/eliasrenman/gardentron.git
synced 2026-03-16 20:46:07 +01:00
14 lines
306 B
TypeScript
14 lines
306 B
TypeScript
import { Server } from "socket.io";
|
|
import { registerSockets } from "./sockets";
|
|
import { registerCronjobs } from "./cron";
|
|
|
|
export async function startServer() {
|
|
const port = 3000 || process.env.HTTP_PORT;
|
|
const io = new Server({});
|
|
|
|
registerSockets(io);
|
|
registerCronjobs();
|
|
|
|
io.listen(port);
|
|
}
|