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.
17 lines
567 B
17 lines
567 B
// eslint-disable-next-line no-unused-vars
|
|
const server = require('@docmirror/mitmproxy')
|
|
const JSON5 = require('json5')
|
|
const path = require('path')
|
|
const home = process.env.HOME
|
|
let configPath = path.join(home, '.dev-sidecar/running.json')
|
|
if (process.argv && process.argv.length > 3) {
|
|
configPath = process.argv[2]
|
|
}
|
|
|
|
const fs = require('fs')
|
|
const configJson = fs.readFileSync(configPath)
|
|
const config = JSON5.parse(configJson)
|
|
const scriptDir = '../../gui/extra/scripts/'
|
|
config.setting.script.defaultDir = path.join(__dirname, scriptDir)
|
|
server.start(config)
|