mirror of https://github.com/stashapp/stash.git
add REACT_APP_PLATFORM_PORT for development (#1411)
* add REACT_APP_PLATFORM_PORT for development Add development REACT_APP_PLATFORM_PORT env variable to createClient.getPlatformURL so that you can more easily run more stash platform services at once during development. If non is given, it falls back to standard port "9999".
This commit is contained in:
parent
0e01374537
commit
c08e0c0f60
|
@ -131,6 +131,7 @@ NOTE: The `make` command in Windows will be `mingw32-make` with MingW.
|
|||
* `make fmt-check` - Ensure changed files are formatted correctly
|
||||
* `make it` - Run the unit and integration tests
|
||||
* `make validate` - Run all of the tests and checks required to submit a PR
|
||||
* `make ui-start` - Runs the UI in development mode. Requires a running stash server to connect to. Stash port can be changed from the default of `9999` with environment variable `REACT_APP_PLATFORM_PORT`.
|
||||
|
||||
## Building a release
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ export const getPlatformURL = (ws?: boolean) => {
|
|||
const platformUrl = new URL(window.location.origin);
|
||||
|
||||
if (!process.env.NODE_ENV || process.env.NODE_ENV === "development") {
|
||||
platformUrl.port = "9999"; // TODO: Hack. Development expects port 9999
|
||||
platformUrl.port = process.env.REACT_APP_PLATFORM_PORT ?? "9999";
|
||||
|
||||
if (process.env.REACT_APP_HTTPS === "true") {
|
||||
platformUrl.protocol = "https:";
|
||||
|
|
Loading…
Reference in New Issue