Significant API progress

This commit is contained in:
oitsjustjose 2022-04-14 20:27:45 -05:00
commit 01227bb28f
27 changed files with 2378 additions and 0 deletions

21
backend/src/server.ts Normal file
View file

@ -0,0 +1,21 @@
import { config as LoadDotenv } from "dotenv";
import winston from "winston";
import app from "./app";
import { LOGGER } from "./app/util/Logger";
import ConnectDb from "./db";
if (process.env.NODE_ENV !== "production") {
LoadDotenv();
LOGGER.add(
new winston.transports.Console({
format: winston.format.simple(),
})
);
}
ConnectDb();
const port = process.env.PORT || 3000;
app.listen(port, () =>
LOGGER.info(`Server started. Listening on port ${port}`)
);