parent
595aacb311
commit
992504705b
31
src/app.ts
31
src/app.ts
|
@ -1,23 +1,20 @@
|
|||
import * as dotenvSafe from 'dotenv-safe';
|
||||
import express from 'express';
|
||||
import consola from 'consola';
|
||||
import * as jwt from 'jsonwebtoken';
|
||||
import { createConnection } from 'typeorm';
|
||||
import bodyparser from "body-parser";
|
||||
import 'reflect-metadata';
|
||||
import routerMain from './routes/index';
|
||||
// const loaders = require('./loaders');
|
||||
import loaders from './loaders/index';
|
||||
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";
|
||||
|
||||
dotenvSafe.config();
|
||||
let app = express();
|
||||
const PORT = process.env.APP_PORT || 4010;
|
||||
|
||||
async function main() {
|
||||
await loaders(app);
|
||||
app.listen(PORT, () => {
|
||||
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
||||
});
|
||||
let app = express();
|
||||
await loaders(app);
|
||||
app.listen(PORT, () => {
|
||||
consola.success(
|
||||
`⚡️[server]: Server is running at http://localhost:${PORT}`
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
main();
|
||||
|
|
Loading…
Reference in New Issue