Move Foundry HTTP APIs out of /api/rivet

This commit is contained in:
Nathan Flurry 2026-03-12 19:46:25 -07:00
parent 436eb4a3a3
commit 58b19c2253
6 changed files with 46 additions and 34 deletions

View file

@ -47,12 +47,14 @@ export type AppShellStripeClient = Pick<
export interface AppShellServices {
appUrl: string;
apiUrl: string;
github: AppShellGithubClient;
stripe: AppShellStripeClient;
}
export interface CreateAppShellServicesOptions {
appUrl?: string;
apiUrl?: string;
github?: AppShellGithubClient;
stripe?: AppShellStripeClient;
}
@ -60,6 +62,7 @@ export interface CreateAppShellServicesOptions {
export function createDefaultAppShellServices(options: CreateAppShellServicesOptions = {}): AppShellServices {
return {
appUrl: (options.appUrl ?? process.env.APP_URL ?? "http://localhost:4173").replace(/\/$/, ""),
apiUrl: (options.apiUrl ?? process.env.BETTER_AUTH_URL ?? process.env.APP_URL ?? "http://localhost:7741").replace(/\/$/, ""),
github: options.github ?? new GitHubAppClient(),
stripe: options.stripe ?? new StripeAppClient(),
};