Skip to content

Commit 4cd6fbe

Browse files
committed
fix: switch runtime server to env
1 parent 2231a3d commit 4cd6fbe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adex/runtime/server.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { existsSync, link, readFileSync } from 'node:fs'
22
import http from 'node:http'
3+
import { env } from 'adex/env'
34
import { dirname, join } from 'node:path'
45
import { fileURLToPath } from 'node:url'
56

@@ -13,8 +14,8 @@ import 'virtual:adex:global.css'
1314

1415
const flags = mri(process.argv.slice(2))
1516

16-
const PORT = flags.port || process.env.PORT || 3000
17-
const HOST = flags.host || process.env.HOST || 'localhost'
17+
const PORT = flags.port || parseInt(env.get('PORT', '3000'), 10)
18+
const HOST = flags.host || env.get('HOST', 'localhost')
1819

1920
const __dirname = dirname(fileURLToPath(import.meta.url))
2021

0 commit comments

Comments
 (0)