20 lines
No EOL
519 B
JavaScript
20 lines
No EOL
519 B
JavaScript
import express from "express";
|
|
import apiRoute from "./routes/api.js";
|
|
import { mainHttpListenPort } from "./config.js";
|
|
import { bot } from "./common.js";
|
|
|
|
// might introduce bugs and probably a bad idea
|
|
Object.freeze(Object.prototype);
|
|
Object.freeze(Object);
|
|
|
|
|
|
const app = express();
|
|
|
|
app.use(express.json());
|
|
app.use("/", express.static("frontend/public/"));
|
|
app.use("/api/v1", apiRoute);
|
|
|
|
app.listen(mainHttpListenPort, () => {
|
|
console.log(`server main: listen on ${mainHttpListenPort}`);
|
|
bot.connect();
|
|
}); |