2020-11-25 17:43:08 +00:00
|
|
|
import * as dotenvSafe from "dotenv-safe";
|
|
|
|
import express from "express";
|
|
|
|
import consola from "consola";
|
|
|
|
// import * as jwt from 'jsonwebtoken';
|
|
|
|
import "reflect-metadata";
|
|
|
|
import loaders from "./loaders/index";
|
2020-11-24 18:28:57 +00:00
|
|
|
|
|
|
|
dotenvSafe.config();
|
2020-11-24 18:54:22 +00:00
|
|
|
const PORT = process.env.APP_PORT || 4010;
|
2020-11-24 18:28:57 +00:00
|
|
|
|
2020-11-25 17:31:06 +00:00
|
|
|
async function main() {
|
2020-11-25 17:43:08 +00:00
|
|
|
let app = express();
|
|
|
|
await loaders(app);
|
|
|
|
app.listen(PORT, () => {
|
|
|
|
consola.success(
|
|
|
|
`⚡️[server]: Server is running at http://localhost:${PORT}`
|
|
|
|
);
|
|
|
|
});
|
2020-11-25 17:31:06 +00:00
|
|
|
}
|
2020-11-25 17:43:08 +00:00
|
|
|
main();
|