docs: correct default path and add PUBLIC_URL=build to npm run start commands

This commit is contained in:
Simon Becker
2023-07-05 15:41:16 +02:00
committed by Bastian
parent 7e6f6490f1
commit 1e3b68215a

View File

@@ -29,14 +29,14 @@ tags: [devops, security]
### Host the application under a sub path ### Host the application under a sub path
To host the application under a sub path, set the environment variable `PUBLIC_URL`, e.g. "/techradar". To host the application under a sub path, set the environment variable `PUBLIC_URL`, e.g. "/techradar".
The default is `/build`. The default is `/`.
> For local development I recommend using `/build` and use this for the following steps. > For local development I recommend using `/build` and use this for the following steps.
### Build the radar ### Build the radar
``` ```
npm i npm i
npm run start PUBLIC_URL=/build npm run start
``` ```
Then open here: http://localhost:8080/build Then open here: http://localhost:8080/build
@@ -44,7 +44,7 @@ Then open here: http://localhost:8080/build
### Build the radar with static files ### Build the radar with static files
``` ```
npm i npm i
npm run start:static PUBLIC_URL=/build npm run start:static
``` ```
Then open here: http://localhost:8080/build Then open here: http://localhost:8080/build