12
src/app.ts
12
src/app.ts
@@ -1,15 +1,17 @@
|
||||
import * as dotenvSafe from "dotenv-safe";
|
||||
import express from "express";
|
||||
import consola from "consola";
|
||||
// import * as jwt from 'jsonwebtoken';
|
||||
import "reflect-metadata";
|
||||
import * as dotenvSafe from "dotenv-safe";
|
||||
import { createExpressServer } from "routing-controllers";
|
||||
import consola from "consola";
|
||||
import loaders from "./loaders/index";
|
||||
|
||||
dotenvSafe.config();
|
||||
const PORT = process.env.APP_PORT || 4010;
|
||||
|
||||
const app = createExpressServer({
|
||||
controllers: [__dirname + "/controllers/*.ts"],
|
||||
});
|
||||
|
||||
async function main() {
|
||||
let app = express();
|
||||
await loaders(app);
|
||||
app.listen(PORT, () => {
|
||||
consola.success(
|
||||
|
||||
Reference in New Issue
Block a user