Skip to content
Snippets Groups Projects
Commit c107fcff authored by Simon Waltemathe's avatar Simon Waltemathe
Browse files

optional import in API_STRING

parent 30ea6032
No related branches found
No related tags found
No related merge requests found
import { API_SERVER_IP, API_SERVER_PORT } from '$env/static/private';
import * as env from '$env/static/private';
export function buildAPIStr(endpoint: string) {
const API_SERVER_IP = env.API_SERVER_IP;
const API_SERVER_PORT = env.API_SERVER_PORT;
return `http://${API_SERVER_IP ?? 'localhost'}:${API_SERVER_PORT ?? '8080'}/${endpoint}`;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment