24 lines
No EOL
439 B
JavaScript
24 lines
No EOL
439 B
JavaScript
import fs from 'fs'
|
|
import { ServiceCore } from 'service-core'
|
|
import * as index from './index.mjs'
|
|
|
|
const port = 4130
|
|
|
|
var core = new ServiceCore('filadelfia_web', import.meta.url, port, '')
|
|
|
|
let config = {
|
|
frontend: {
|
|
url: 'http://localhost:' + port
|
|
}
|
|
}
|
|
|
|
try {
|
|
config = JSON.parse(fs.readFileSync('./config.json'))
|
|
} catch {}
|
|
|
|
config.port = port
|
|
|
|
core.setConfig(config)
|
|
core.init(index).then(function() {
|
|
return core.run()
|
|
}) |