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:
parent
2a959f354c
commit
3773d659cc
17 changed files with 137 additions and 106 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue