nfp_sites/dev.mjs

22 lines
410 B
JavaScript
Raw Normal View History

2022-04-05 16:47:24 +00:00
import fs from 'fs'
2022-04-05 14:43:23 +00:00
import { ServiceCore } from 'service-core'
import * as index from './index.mjs'
2022-04-05 16:47:24 +00:00
var core = new ServiceCore('nfp_moe', import.meta.url, 4030, '')
let config = {
frontend: {
url: 'http://localhost:4030'
}
}
try {
config = JSON.parse(fs.readFileSync('./config.json'))
} catch {}
config.port = 4030
core.setConfig(config)
2022-04-05 14:43:23 +00:00
core.init(index).then(function() {
return core.run()
})