Skip to content

Commit

Permalink
fix: change order
Browse files Browse the repository at this point in the history
  • Loading branch information
great-park committed Nov 10, 2022
1 parent dbec0f6 commit 0978c4c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,25 @@ import express from '@/config/express';
import logger from '@/config/winston';
import { mainJob } from '@/app/scheduler';
import { redisClient } from '@/app/redis'
// import { AppDataSource } from '@/config/datasource';

const port = process.env.PORT || 8080;
express().listen(port);
logger.info(`environment : ${process.env.NODE_ENV} - API Server Start At Port ${port}`);
logger.info(`environment : ${process.env.NODE_ENV} - Mail Server Start At Port ${port}`);
// Redis 연결
redisClient.connect().then();

//schedule 예약 - node 재실행 시 재예약
mainJob();

// Redis 연결
redisClient.connect().then();


// AppDataSource.initialize()
// .then(() => {
// logger.info('DB Connected');
// express().listen(port);
// logger.info(`environment : ${process.env.NODE_ENV} - API Server Start At Port ${port}`);
// })
// .catch((error) => {
// logger.error(error.toString());
// });

0 comments on commit 0978c4c

Please sign in to comment.