feat: integrate Convex API and add N5 proxy functionality
- Added Convex client setup in a new module for handling Convex API interactions. - Implemented N5Proxy to handle requests for the /n5/:slug route, querying Convex for application links. - Updated app context to include Convex client and API. - Adjusted routing to support new Convex API endpoints. - Enhanced error handling for missing applications in the N5 proxy.
This commit is contained in:
@@ -7,7 +7,7 @@ import { BailianProvider } from '@kevisual/ai';
|
||||
import * as schema from './db/schema.ts';
|
||||
import { config } from './modules/config.ts'
|
||||
import { db } from './modules/db.ts'
|
||||
|
||||
import { convexClient, convexApi } from './modules/convex.ts'
|
||||
export const router = useContextKey('router', () => new SimpleRouter());
|
||||
export const runtime = useContextKey('runtime', () => {
|
||||
return {
|
||||
@@ -44,3 +44,6 @@ export const ai = useContextKey('ai', () => {
|
||||
|
||||
export { schema };
|
||||
|
||||
|
||||
export const convex = useContextKey('convex', () => convexClient);
|
||||
export { convexApi };
|
||||
Reference in New Issue
Block a user