Skip to content

Commit

Permalink
Update workbench-app/.env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
dluc committed Nov 26, 2024
1 parent 1c689de commit 74707f1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
2 changes: 1 addition & 1 deletion workbench-app/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ VITE_SEMANTIC_WORKBENCH_CLIENT_ID=22cb77c3-ca98-4a26-b4db-ac4dcecba690
VITE_SEMANTIC_WORKBENCH_AUTHORITY=https://login.microsoftonline.com/common

# The URL for the Semantic Workbench service.
VITE_SEMANTIC_WORKBENCH_SERVICE_URL=http://127.0.0.1:3000
VITE_SEMANTIC_WORKBENCH_SERVICE_URL=http://localhost:3000
10 changes: 1 addition & 9 deletions workbench-app/src/Constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
// Allow static build of React code to access env vars
// SEE https://create-react-app.dev/docs/title-and-meta-tags/#injecting-data-from-the-server-into-the-page
const serviceUrl = (window.VITE_SEMANTIC_WORKBENCH_SERVICE_URL && window.VITE_SEMANTIC_WORKBENCH_SERVICE_URL.startsWith('https://'))
? window.VITE_SEMANTIC_WORKBENCH_SERVICE_URL
: (import.meta.env.VITE_SEMANTIC_WORKBENCH_SERVICE_URL)
? import.meta.env.VITE_SEMANTIC_WORKBENCH_SERVICE_URL
: 'http://127.0.0.1:3000';

export const Constants = {
app: {
name: 'Semantic Workbench',
Expand Down Expand Up @@ -37,7 +29,7 @@ export const Constants = {
id: 'local',
name: 'Semantic Workbench backend service on localhost or GitHub Codespaces',
// Can be overridden by env var VITE_SEMANTIC_WORKBENCH_SERVICE_URL
url: serviceUrl,
url: import.meta.env.VITE_SEMANTIC_WORKBENCH_SERVICE_URL || 'http://localhost:3000',
brand: 'light',
},
// {
Expand Down
9 changes: 0 additions & 9 deletions workbench-app/src/global.d.ts

This file was deleted.

0 comments on commit 74707f1

Please sign in to comment.