2022-05-24 16:46:21 +00:00
|
|
|
import App from 'CommonServer/Utils/StartServer';
|
2022-12-29 15:50:53 +00:00
|
|
|
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
2022-11-10 18:50:20 +00:00
|
|
|
import logger from 'CommonServer/Utils/Logger';
|
2019-09-09 13:30:52 +00:00
|
|
|
|
2022-12-08 08:38:08 +00:00
|
|
|
export const APP_NAME: string = 'dashboard';
|
2022-05-25 22:03:45 +00:00
|
|
|
|
|
|
|
const app: ExpressApplication = Express.getExpressApp();
|
|
|
|
|
2023-08-10 17:25:15 +00:00
|
|
|
const init: () => Promise<void> = async (): Promise<void> => {
|
2022-11-10 18:50:20 +00:00
|
|
|
try {
|
|
|
|
// init the app
|
2022-12-29 15:50:53 +00:00
|
|
|
await App(APP_NAME, undefined, true);
|
2022-11-10 18:50:20 +00:00
|
|
|
} catch (err) {
|
|
|
|
logger.error('App Init Failed:');
|
|
|
|
logger.error(err);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-08-10 18:00:27 +00:00
|
|
|
init().catch((err: Error) => {
|
|
|
|
logger.error(err);
|
2023-09-27 19:48:50 +00:00
|
|
|
process.exit(1);
|
2023-08-10 18:00:27 +00:00
|
|
|
});
|
2022-11-10 18:50:20 +00:00
|
|
|
|
2022-05-13 10:50:24 +00:00
|
|
|
export default app;
|