feat(core): enable port configuration via environment variable (#9610)

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
ozaki 2023-12-07 11:46:35 +01:00 committed by GitHub
parent e00340331d
commit d3752d227b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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';