server: Read local package.json as opposed to the one in the runner folder
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2022-03-12 22:33:28 +00:00
parent 2a18df18ba
commit 4dab6ea05d

View file

@ -1,9 +1,9 @@
import path from 'path'
import { readFileSync } from 'fs' import { readFileSync } from 'fs'
import { fileURLToPath } from 'url' import { Util } from 'service-core'
export function run(http, orgPort, ctx) { export function run(http, orgPort, ctx) {
let packagePath = ctx.util.getPathFromRoot('./package.json') let localUtil = new Util(import.meta.url)
let packagePath = localUtil.getPathFromRoot('../package.json')
let packageInfo = JSON.parse(readFileSync(packagePath)) let packageInfo = JSON.parse(readFileSync(packagePath))
const server = http.createServer(function (req, res) { const server = http.createServer(function (req, res) {