diff --git a/.gitignore b/.gitignore index 5c8ae45e..24be0112 100644 --- a/.gitignore +++ b/.gitignore @@ -174,3 +174,5 @@ dist **/.vitepress/cache **/.vitepress/dist + +.obsidian/* diff --git a/docs/integrations/better-auth.md b/docs/integrations/better-auth.md index 516b3e32..f48d40eb 100644 --- a/docs/integrations/better-auth.md +++ b/docs/integrations/better-auth.md @@ -48,7 +48,7 @@ const app = new Elysia() .listen(3000) console.log( - `🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}` + `🦊 Elysia is running at http://${app.server?.hostname}:${app.server?.port}` ) ``` @@ -98,8 +98,12 @@ However if we are using [@elysiajs/openapi](/plugins/openapi), you might want to We may do that with the following code: + ```ts import { openAPI } from 'better-auth/plugins' +export const auth = betterAuth({ + plugins: [openAPI()], // [!code ++] +}); let _schema: ReturnType const getSchema = async () => (_schema ??= auth.api.generateOpenAPISchema()) diff --git a/docs/patterns/openapi.md b/docs/patterns/openapi.md index 839f2fe2..682a39eb 100644 --- a/docs/patterns/openapi.md +++ b/docs/patterns/openapi.md @@ -104,7 +104,7 @@ const app = new Elysia() Having issues with type generation? ### Caveats: Root path -As it's unreliable to guess to root of the project, it's recommended to provide the path to the project root to allow generator to run correctly, especially when using monorepo. +If you use turbomonorepo, you don't need to worry about the root path . As it's unreliable to guess to root of the project, it's recommended to provide the path to the project root to allow generator to run correctly, especially when using monorepo. ```ts import { Elysia, t } from 'elysia'