Skip to content

Commit 0eb91b2

Browse files
authored
🔧 fix: astro pages path (#271)
1 parent 6b89c50 commit 0eb91b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎docs/integrations/astro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default defineConfig({
3535
4. Export the handler with the name of method you want to expose
3636

3737
```typescript
38-
// apps/[...slugs].ts
38+
// pages/[...slugs].ts
3939
const app = new Elysia()
4040
.get('/api', () => 'hi')
4141
.post('/api', ({ body }) => body, {
@@ -68,10 +68,10 @@ Please refer to [Astro Endppoint](https://docs.astro.build/en/core-concepts/endp
6868

6969
If you place an Elysia server not in the root directory of the app router, you need to annotate the prefix to the Elysia server.
7070

71-
For example, if you place Elysia server in **apps/api/[...slugs].ts**, you need to annotate prefix as **/api** to Elysia server.
71+
For example, if you place Elysia server in **pages/api/[...slugs].ts**, you need to annotate prefix as **/api** to Elysia server.
7272

7373
```typescript
74-
// apps/api/[...slugs].ts
74+
// pages/api/[...slugs].ts
7575
const app = new Elysia({ prefix: '/api' }) // [!code ++]
7676
.get('/', () => 'hi')
7777
.post('/', ({ body }) => body, {

0 commit comments

Comments
 (0)