1234567891011121314151617181920212223 |
- import "dotenv/config";
- /** API version to use in the base URL */
- export const apiVersion = process.env.API_VERSION ?? "v2";
- /** Base URL for the locally hosted API */
- export const baseUrl = `http://127.0.0.1:${process.env.HTTP_PORT}/${apiVersion}`;
- /** Max results that can be returned by geniURL - should be consistent with `maxResultsAmt` in `src/constants.ts` */
- export const maxResultsAmt = 10;
- /** Auth token for local testing */
- const authToken = process.env.AUTH_TOKENS?.split(",")[0];
- export const defaultFetchOpts = {
- method: "GET",
- headers: {
- ...(authToken
- ? { "Authentication": `Bearer ${authToken}` }
- : {}
- ),
- },
- } as const satisfies RequestInit;
|