diff --git a/convex/_generated/api.d.ts b/convex/_generated/api.d.ts index 79a17e119..b5546345b 100644 --- a/convex/_generated/api.d.ts +++ b/convex/_generated/api.d.ts @@ -8,6 +8,7 @@ * @module */ +import type * as http from "../http.js"; import type * as stats from "../stats.js"; import type { @@ -24,6 +25,7 @@ import type { * ``` */ declare const fullApi: ApiFromModules<{ + http: typeof http; stats: typeof stats; }>; declare const fullApiWithMounts: typeof fullApi; diff --git a/convex/http.ts b/convex/http.ts new file mode 100644 index 000000000..492aa4641 --- /dev/null +++ b/convex/http.ts @@ -0,0 +1,8 @@ +import { ossStats } from './stats' +import { httpRouter } from 'convex/server' + +const http = httpRouter() + +ossStats.registerRoutes(http) + +export default http diff --git a/convex/stats.ts b/convex/stats.ts index cd7ae96aa..99a681ab8 100644 --- a/convex/stats.ts +++ b/convex/stats.ts @@ -1,7 +1,7 @@ import { OssStats } from '@erquhart/convex-oss-stats' import { components } from './_generated/api' -const ossStats = new OssStats(components.ossStats, { +export const ossStats = new OssStats(components.ossStats, { githubOwners: ['tanstack'], npmOrgs: ['tanstack'], }) diff --git a/package.json b/package.json index cfc080e2e..480fa0156 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "type": "module", "scripts": { "dev": "vinxi dev", - "dev:convex": "convex dev", + "dev:convex": "convex dev --tail-logs", "build": "vinxi build", "start": "vinxi start", "lint": "prettier --check '**/*' --ignore-unknown && eslint --ext .ts,.tsx ./app",