1
0

consts.ts 534 B

12345678910111213141516171819
  1. import "dotenv/config";
  2. export const baseUrl = `http://127.0.0.1:${process.env.HTTP_PORT}/v2`;
  3. /** Max results that can be returned by geniURL - should be consistent with `maxResultsAmt` in `src/constants.ts` */
  4. export const maxResultsAmt = 10;
  5. /** Auth token for local testing */
  6. const authToken = process.env.AUTH_TOKENS?.split(",")[0];
  7. export const defaultFetchOpts = {
  8. method: "GET",
  9. headers: {
  10. ...(authToken
  11. ? { "Authentication": `Bearer ${authToken}` }
  12. : {}
  13. ),
  14. },
  15. } as const satisfies RequestInit;