diff options
author | 2021-04-22 08:25:57 -0400 | |
---|---|---|
committer | 2021-04-22 08:25:57 -0400 | |
commit | da033e27eada3bbcad5544be282e9edcf4799003 (patch) | |
tree | 8fa1203d4e318f006d254abff79caa2508a86fd2 /src/dev.ts | |
parent | a7185735da7413e132f313ff5086db74304d7654 (diff) | |
download | astro-da033e27eada3bbcad5544be282e9edcf4799003.tar.gz astro-da033e27eada3bbcad5544be282e9edcf4799003.tar.zst astro-da033e27eada3bbcad5544be282e9edcf4799003.zip |
CLI docs (#121)
* Start of cli docs
* Document the CLI
Also adds support for the `--config` option and `--port` option for the dev server.
* Add tests for --config and --port flags
* Add port to validateConfig
Diffstat (limited to 'src/dev.ts')
-rw-r--r-- | src/dev.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dev.ts b/src/dev.ts index 8c4140259..8f93aabf6 100644 --- a/src/dev.ts +++ b/src/dev.ts @@ -8,7 +8,6 @@ import { defaultLogDestination, error, parseError } from './logger.js'; import { createRuntime } from './runtime.js'; const hostname = '127.0.0.1'; -const port = 3000; // Disable snowpack from writing to stdout/err. snowpackLogger.level = 'silent'; @@ -65,6 +64,7 @@ export default async function dev(astroConfig: AstroConfig) { } }); + const port = astroConfig.devOptions.port; server.listen(port, hostname, () => { // eslint-disable-next-line no-console console.log(`Server running at http://${hostname}:${port}/`); |