3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

Consolidate .env files. More work on dev containers.

This commit is contained in:
Dragory 2022-06-26 14:34:54 +03:00
parent 2a959f354c
commit 3773d659cc
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
17 changed files with 137 additions and 106 deletions

View file

@ -8,12 +8,13 @@ import { initGuildsAPI } from "./guilds/index";
import { clientError, error, notFound } from "./responses";
import { startBackgroundTasks } from "./tasks";
import multer from "multer";
import { env } from "../env";
const app = express();
app.use(
cors({
origin: process.env.DASHBOARD_URL,
origin: `https://${env.DASHBOARD_DOMAIN}`,
}),
);
app.use(
@ -48,7 +49,7 @@ app.use((req, res, next) => {
return notFound(res);
});
const port = (process.env.PORT && parseInt(process.env.PORT, 10)) || 3000;
const port = env.API_PORT;
app.listen(port, "0.0.0.0", () => console.log(`API server listening on port ${port}`)); // tslint:disable-line
startBackgroundTasks();