1 parent
e3883fecbd
commit
6ce88a1e3d
5 files changed
+44
-25
No files matched your search
+9
-13
@@ -7,21 +7,17 @@ import bodyparser from "body-parser";
|
||||
import 'reflect-metadata';
|
||||
import routerMain from './routes/index';
|
||||
// const loaders = require('./loaders');
|
||||
import * as loaders from './loaders/index';
|
||||
import loaders from './loaders/index';
|
||||
|
||||
dotenvSafe.config();
|
||||
const app = express();
|
||||
let app = express();
|
||||
const PORT = process.env.APP_PORT || 4010;
|
||||
|
||||
createConnection()
|
||||
.then((connection) => {})
|
||||
.catch((err) => {
|
||||
consola.error(err);
|
||||
})
|
||||
.finally(() => {
|
||||
// await loaders.init(app);
|
||||
app.use('/api/', routerMain);
|
||||
app.listen(PORT, () => {
|
||||
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
||||
});
|
||||
async function main() {
|
||||
await loaders(app);
|
||||
app.listen(PORT, () => {
|
||||
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
Reference in new issue
Block a user