You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, the following is the default method to run the storybook:
start-storybook -p 5700
However, I stumbled upon this undocumented SBCONFIG_PORT environment variable in the code while looking for a way to run the storybook remotely on a specific port defined as an ENV_VAR.
It turns out I can start the server this way, without specifying the port with -p:
export SBCONFIG_PORT=5700
start-storybook
Is it recommended to use SBCONFIG_PORT ? If so, it could be useful to find a mention of this in the docs.
As a side note, I edited my init script to use this environment variable only if it's set, otherwise, fallback to the default hardcoded. The reason is to be able to set a different PORT on a remote env without having to EXPORT one locally.
start-storybook -p ${SBCONFIG_PORT:-5700}
The text was updated successfully, but these errors were encountered:
According to the docs, the following is the default method to run the storybook:
However, I stumbled upon this undocumented
SBCONFIG_PORT
environment variable in the code while looking for a way to run the storybook remotely on a specific port defined as an ENV_VAR.It turns out I can start the server this way, without specifying the port with
-p
:export SBCONFIG_PORT=5700 start-storybook
Is it recommended to use
SBCONFIG_PORT
? If so, it could be useful to find a mention of this in the docs.As a side note, I edited my init script to use this environment variable only if it's set, otherwise, fallback to the default hardcoded. The reason is to be able to set a different PORT on a remote env without having to EXPORT one locally.
start-storybook -p ${SBCONFIG_PORT:-5700}
The text was updated successfully, but these errors were encountered: