Skip to content

Commit

Permalink
set PublicUrlBase for the temporary server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentao-Kuang committed Jun 15, 2022
1 parent 756d0b5 commit c6a291c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/config-cli/src/cli/screenshot/screenshot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Config, fsa, LogConfig, LogType } from '@basemaps/shared';
import { Config, Env, fsa, LogConfig, LogType } from '@basemaps/shared';
import { mkdir } from 'fs/promises';
import { Browser, chromium } from 'playwright';
import { CommandLineAction, CommandLineStringParameter } from '@rushstack/ts-command-line';
Expand Down Expand Up @@ -77,6 +77,8 @@ export class CommandScreenShot extends CommandLineAction {
if (config != null) {
const port = await getPort();
host = `http://localhost:${port}`;
// Force a default url base so WMTS requests know their relative url
process.env[Env.PublicUrlBase] = host;
BasemapsServer = await startServer(port, config, logger);
logger.info({ url: host }, 'ServerStarted');
}
Expand Down

0 comments on commit c6a291c

Please sign in to comment.