Ver Fonte

updating readme and run scripts

Signed-off-by: Logan Ballard <loganballard@gmail.com>
Logan Ballard há 3 anos atrás
pai
commit
69fb2a05a2
2 ficheiros alterados com 9 adições e 8 exclusões
  1. 7 6
      ui/README.md
  2. 2 2
      ui/package.json

+ 7 - 6
ui/README.md

@@ -23,26 +23,27 @@ kubectl port-forward --namespace opencost service/opencost 9090
 
 ## Running Locally
 
-The UI can be run locally using the `npm run` command.
+The UI can be run locally using the `npm run serve` command.
 
 ```sh
 $ npm run serve
 > kubecost-ui-open@0.0.1 serve
-> BASE_URL=${BASE_URL:=/model} npx parcel serve src/index.html
+> npx parcel serve src/index.html
 
 Server running at http://localhost:1234
-✨ Built in 76ms
+✨ Built in 1.96s
 ```
 
 And can have a custom URL backend prefix.
 
 ```sh
-$ BASE_URL=test npm run serve
+BASE_URL=http://localhost:9090/test npm run serve
+
 > kubecost-ui-open@0.0.1 serve
-> BASE_URL=${BASE_URL:=/model} npx parcel serve src/index.html
+> npx parcel serve src/index.html
 
 Server running at http://localhost:1234
-✨ Built in 804ms
+✨ Built in 772ms
 ```
 
 In addition, similar behavior can be replicated with the docker container:

+ 2 - 2
ui/package.json

@@ -3,8 +3,8 @@
   "version": "0.0.1",
   "description": "Open source UI for Kubecost",
   "scripts": {
-    "build": "BASE_URL=${BASE_URL:=/model} npx parcel build src/index.html && echo \"built with BASE_URL $BASE_URL\"",
-    "serve": "BASE_URL=${BASE_URL:=/model} npx parcel serve src/index.html",
+    "build": "npx parcel build src/index.html",
+    "serve": "npx parcel serve src/index.html",
     "clean": "rm -rf dist/*",
     "test": "echo \"Error: no test specified\" && exit 1",
     "preinstall": "npx npm-force-resolutions"