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