File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export default defineConfig({
35
35
4 . Export the handler with the name of method you want to expose
36
36
37
37
``` typescript
38
- // apps /[...slugs].ts
38
+ // pages /[...slugs].ts
39
39
const app = new Elysia ()
40
40
.get (' /api' , () => ' hi' )
41
41
.post (' /api' , ({ body }) => body , {
@@ -68,10 +68,10 @@ Please refer to [Astro Endppoint](https://docs.astro.build/en/core-concepts/endp
68
68
69
69
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.
70
70
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.
72
72
73
73
``` typescript
74
- // apps /api/[...slugs].ts
74
+ // pages /api/[...slugs].ts
75
75
const app = new Elysia ({ prefix: ' /api' }) // [!code ++]
76
76
.get (' /' , () => ' hi' )
77
77
.post (' /' , ({ body }) => body , {
You can’t perform that action at this time.
0 commit comments