index.ts
453 字节
import * as express from 'express'
const config = require('../config/config.js')
import { job_handlers } from './job/index'
import { XxlJobExecutor } from './xxl_job/index'
const app = express()
app.use(require('body-parser').json())
new XxlJobExecutor(config.xxl_job, job_handlers).applyMiddleware({ app, domain: config.app_domain, path: '' })
app.listen(config.port, () => {
console.log(`job-ydn-zq app listening on port ${config.port}`)
})