fix: keep startMediaServer runtime arg order
This commit is contained in:
parent
b1c88dd7d7
commit
524cd283b2
@ -42,7 +42,7 @@ export async function ensureMediaHosted(
|
|||||||
}
|
}
|
||||||
if (needsServerStart && opts.startServer) {
|
if (needsServerStart && opts.startServer) {
|
||||||
if (!mediaServer) {
|
if (!mediaServer) {
|
||||||
mediaServer = await startMediaServer(port, TTL_MS, undefined, runtime);
|
mediaServer = await startMediaServer(port, TTL_MS, runtime);
|
||||||
logInfo(
|
logInfo(
|
||||||
`🦞 Started temporary media host on http://127.0.0.1:${port}/media/:id (TTL ${TTL_MS / 1000}s)`,
|
`🦞 Started temporary media host on http://127.0.0.1:${port}/media/:id (TTL ${TTL_MS / 1000}s)`,
|
||||||
runtime,
|
runtime,
|
||||||
|
|||||||
@ -83,8 +83,8 @@ export function attachMediaRoutes(
|
|||||||
export async function startMediaServer(
|
export async function startMediaServer(
|
||||||
port: number,
|
port: number,
|
||||||
ttlMs = DEFAULT_TTL_MS,
|
ttlMs = DEFAULT_TTL_MS,
|
||||||
host = "127.0.0.1",
|
|
||||||
runtime: RuntimeEnv = defaultRuntime,
|
runtime: RuntimeEnv = defaultRuntime,
|
||||||
|
host = "127.0.0.1",
|
||||||
): Promise<Server> {
|
): Promise<Server> {
|
||||||
const app = express();
|
const app = express();
|
||||||
attachMediaRoutes(app, ttlMs, runtime);
|
attachMediaRoutes(app, ttlMs, runtime);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user