Skip to content

Commit 8edf0e3

Browse files
committed
🎉 feat: release 1.2.6
1 parent 8efb212 commit 8edf0e3

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

.github/ISSUE_TEMPLATE/2-bug-report.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ body:
1919
attributes:
2020
label: What version of Elysia is running?
2121
description: Copy the output of `Elysia --revision`
22+
- type: input
23+
attributes:
24+
label: What version of Node Adapter are you using?
25+
description: Copy the output of `Elysia --revision`
2226
- type: input
2327
attributes:
2428
label: What platform is your computer?

example/c.ts

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
import { Elysia } from 'elysia'
22
import node from '../src'
33

4-
export const elysiaApp = new Elysia({
5-
adapter: node()
6-
})
7-
// .onError(({ error }) => {
8-
// console.log(error)
9-
// })
10-
.patch('/', () => {
11-
const form = new FormData()
12-
form.append('name', 'Sancho')
13-
form.append('alias', 'Don Quixote')
14-
15-
return form
4+
new Elysia({ adapter: node() })
5+
.onError(({ error }) => {
6+
return error
167
})
8+
.derive(({ body }) => {
9+
return {
10+
operation: {
11+
a: 'test',
12+
body
13+
}
14+
}
15+
})
16+
.post(`/bug`, ({ operation }) => {
17+
return operation
18+
})
19+
.listen(3777)
1720

18-
export type ElysiaApp = typeof elysiaApp
19-
20-
elysiaApp.listen(3334)
21-
console.log('Server started at http://localhost:3334')
22-
23-
fetch('http://localhost:3334/', { method: 'PATCH' })
24-
.then((x) => x.formData())
21+
fetch('http://localhost:3777/bug', {
22+
method: 'POST',
23+
headers: {
24+
'Content-Type': 'application/json'
25+
},
26+
body: JSON.stringify({ operation: 'test' })
27+
})
28+
.then((x) => x.text())
2529
.then(console.log)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@elysiajs/node",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"description": "Plugin for Elysia for retreiving Bearer token",
55
"license": "MIT",
66
"scripts": {

0 commit comments

Comments
 (0)