Spaces:
Sleeping
Sleeping
yassinekolsi
Fix all TypeScript errors: remove unused imports, delete orphan reactflow components
532554f Download ui/lib/api-utils.ts from vignt97867896/bioflow: direct link, hf CLI and curl.
- Browser
- Download file 322 Bytes
-
https://huggingface.co/spaces/vignt97867896/bioflow/resolve/main/ui/lib/api-utils.ts
- Command line
-
hf download hf://spaces/vignt97867896/bioflow/ui/lib/api-utils.ts
-
curl -L -o api-utils.ts https://huggingface.co/spaces/vignt97867896/bioflow/resolve/main/ui/lib/api-utils.ts
322 Bytes
| export function getApiUrl() { | |
| if (typeof window !== 'undefined') return ''; // browser should use relative url | |
| if (process.env['BACKEND_URL']) | |
| return `https://${process.env['BACKEND_URL']}`; // SSR should use vercel url | |
| return `http://localhost:${process.env['PORT'] ?? 3000}`; // dev SSR should use localhost | |
| } | |