mirror of
https://github.com/moghtech/komodo.git
synced 2026-11-05 02:45:16 -06:00
24 lines
631 B
TypeScript
24 lines
631 B
TypeScript
import fastify from "fastify";
|
|
import fastifyCors from "fastify-cors";
|
|
import fastifyHelmet from "fastify-helmet";
|
|
import { LOG, PORT } from "./config";
|
|
import docker from "./plugins/docker";
|
|
import auth from "./plugins/auth";
|
|
import routes from "./routes";
|
|
import pm2 from "./plugins/pm2";
|
|
|
|
const app = fastify({ logger: LOG })
|
|
.register(fastifyHelmet)
|
|
.register(fastifyCors)
|
|
.register(docker)
|
|
.register(auth)
|
|
.register(pm2)
|
|
.register(routes);
|
|
|
|
app.listen(PORT, "0.0.0.0", (err, address) => {
|
|
if (err) {
|
|
app.log.error(err);
|
|
process.exit(1);
|
|
}
|
|
console.log(`monitor periphery listening at ${address}`);
|
|
}); |