Files
komodo/core/src/main.ts
T
2022-03-13 22:04:34 -07:00

20 lines
453 B
TypeScript

import fastify from "fastify";
import fastifyCors from "fastify-cors";
import auth from "./auth";
import { LOG, PORT } from "./config";
import db from "./db";
import ws from "./ws";
const app = fastify({ logger: LOG })
.register(fastifyCors)
.register(db)
.register(auth)
.register(ws);
app.listen(PORT, (err, address) => {
if (err) {
app.log.error(err);
process.exit(1);
}
console.log(`monitor core listening at ${address}`);
});