constants.ts 321 B

123456789101112
  1. import "dotenv/config";
  2. export const baseUrl = `http://127.0.0.1:${process.env.HTTP_PORT}/v2`;
  3. const authToken = process.env.AUTH_TOKENS?.split(",")[0];
  4. export const defaultFetchOpts: Partial<RequestInit> = {
  5. method: "GET",
  6. headers: {
  7. ...(authToken ? { "Authentication": `Bearer ${authToken}` } : {}),
  8. },
  9. };