You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
458 B

  1. const path = require('path')
  2. let WIKI = {
  3. IS_DEBUG: process.env.NODE_ENV === 'development',
  4. ROOTPATH: process.cwd(),
  5. SERVERPATH: path.join(process.cwd(), 'server'),
  6. Error: require('../helpers/error'),
  7. configSvc: require('./config')
  8. }
  9. global.WIKI = WIKI
  10. WIKI.configSvc.init()
  11. WIKI.logger = require('./logger').init('JOB')
  12. const args = require('yargs').argv
  13. ;(async () => {
  14. await require(`../jobs/${args.job}`)(args.data)
  15. process.exit(0)
  16. })()