修改默认cron端口

This commit is contained in:
whyour 2021-05-05 19:02:41 +08:00
parent 9185360482
commit 83ff4db8c4
3 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
MONGODB_URI='mongodb://'
YIYAN_MONGODB_URI=''
CRON_PORT=5500
PORT=5600
LOG_LEVEL='debug'

View File

@ -27,6 +27,7 @@ if (envFound.error) {
export default {
port: parseInt(process.env.PORT as string, 10),
cronPort: parseInt(process.env.CRON_PORT as string, 10),
secret: process.env.SECRET,
logs: {
level: process.env.LOG_LEVEL || 'silly',

View File

@ -5,6 +5,7 @@ import Logger from './loaders/logger';
import { Container } from 'typedi';
import CronService from './services/cron';
import { CrontabStatus } from './data/cron';
import config from './config';
const app = express();
@ -44,11 +45,11 @@ const run = async () => {
};
app
.listen(5800, () => {
.listen(config.cronPort, () => {
run();
Logger.info(`
################################################
🛡 Schedule listening on port: 5800 🛡
🛡 Schedule listening on port: ${config.cronPort} 🛡
################################################
`);
})