File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ type Props = {
1010};
1111
1212const { title, description } = Astro .props ;
13- const apiUrl = import . meta .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' ;
13+ const apiUrl = process .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' ;
1414---
1515
1616<!doctype html >
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ export function getApiUrl(): string {
44 if ( typeof window !== 'undefined' ) {
55 return ( window as any ) . __API_URL__ || DEFAULT_API_URL ;
66 }
7- return import . meta . env . VITE_API_URL || DEFAULT_API_URL ;
7+ return process . env . VITE_API_URL || DEFAULT_API_URL ;
88}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ if (isDev) {
2828
2929// API key will be fetched client-side to avoid exposing it in the HTML
3030let apiKey = " Loading..." ;
31- const apiUrl = import . meta .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' ;
31+ const apiUrl = process .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' ;
3232---
3333
3434<PageLayout title =" API Key" description =" Your personal API key for accessing Research Computer services" >
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ let tokenData = {};
99let error = null ;
1010
1111try {
12- const response = await fetch (` ${import . meta .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' }/v1/metrics ` , {
12+ const response = await fetch (` ${process .env .VITE_API_URL || ' https://api.swissai.svc.cscs.ch' }/v1/metrics ` , {
1313 method: " POST" ,
1414 headers: {
1515 " Content-Type" : " application/json" ,
You can’t perform that action at this time.
0 commit comments