Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

Commit

Permalink
Target local API without API_HOST env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonfagan committed May 16, 2023
1 parent cfd0b06 commit 46cffc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const load = async ({ fetch }) => {
const result = await fetch('https://starboardcoop-things-api.glitch.me/things');
const host = process.env.API_HOST ?? 'http://localhost:8088';
const result = await fetch(`${host}/things`);
const data = await result.json();
data.things = data.things.filter(thing => thing.categories);

Expand Down

0 comments on commit 46cffc7

Please sign in to comment.