🔧 create backend connector

create a connector to communicate with the backend service using the ky module.
This commit is contained in:
2025-08-15 16:39:40 +07:00
parent e06360b5a9
commit 3dad8ef528
4 changed files with 17 additions and 1 deletions

11
shared/api/connector.ts Normal file
View File

@ -0,0 +1,11 @@
"use server";
import ky from "ky";
export const api = ky.create({
prefixUrl: process.env.MAIN_BACKEND_API_URL,
credentials: "include",
headers: {
access_token: process.env.MAIN_BACKEND_API_KEY,
},
});