Skip to content

Commit

Permalink
feat(core): enable port configuration via environment variable (#9610)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
  • Loading branch information
OzakIOne and slorber committed Dec 7, 2023
1 parent e003403 commit d3752d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/docusaurus-utils/src/constants.ts
Expand Up @@ -83,7 +83,9 @@ export const DEFAULT_I18N_DIR_NAME = 'i18n';
export const CODE_TRANSLATIONS_FILE_NAME = 'code.json';

/** Dev server opens on this port by default. */
export const DEFAULT_PORT = 3000;
export const DEFAULT_PORT = process.env.PORT
? parseInt(process.env.PORT, 10)
: 3000;

/** Default plugin ID. */
export const DEFAULT_PLUGIN_ID = 'default';
Expand Down

0 comments on commit d3752d2

Please sign in to comment.