Skip to content

Commit

Permalink
fix: avoid --experimental-json-modules, read pkg.json via fs
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Jun 18, 2021
1 parent 947de22 commit 376e8fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/js/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { readFileSync } from 'fs'
import log from './log/index.js'
import Orchestrator from './orchestrator.js'
import packageJson from '../../../package.json'

export class App {
static main (argv) {
log.info(`Qorsproxy@${packageJson.version} is loading...`)
const pkg = JSON.parse(readFileSync(new URL('../../../package.json', import.meta.url)))

log.info(`Qorsproxy@${pkg.version} is loading...`)
log.info(`argv=${JSON.stringify(argv)}`)

return new Orchestrator(argv)
Expand Down

0 comments on commit 376e8fd

Please sign in to comment.