0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
This commit is contained in:
Robin Millette 2022-02-28 17:04:03 -05:00 committed by GitHub
parent b1290c44d5
commit 329146f3c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@ interface Product {
//let origin: string;
const { mode } = import.meta.env;
const origin = mode === 'develeopment' ? `http://localhost:3000` : `http://localhost:8085`;
const origin = mode === 'develepment' ? `http://localhost:3000` : `http://localhost:8085`;
async function get<T>(endpoint: string, cb: (response: Response) => Promise<T>): Promise<T> {
const response = await fetch(`${origin}${endpoint}`);