Skip to content

Commit 160bf0e

Browse files
committed
🎉 feat: release
1 parent fe00d71 commit 160bf0e

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 1.2.4 - 9 Jan 2024
22
Bug fix:
33
- Support Elysia 1.2.11
4+
- [#23](https://github.com/elysiajs/node/issues/23) Response body object should not be disturbed or locked
45
- [#15](https://github.com/elysiajs/node/issues/15) Possibly fix `ReadableStream` duplex issue?
56
- [#14](https://github.com/elysiajs/node/issues/14) ReadableStream has already been used if request is reference multiple time
67

example/c.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,11 @@
1-
import { Elysia } from 'elysia'
1+
import { Elysia, t } from 'elysia'
22
import { node } from '../src'
33
import cors from '@elysiajs/cors'
44

55
const app = new Elysia({
66
adapter: node()
77
})
8-
.use(
9-
cors({
10-
origin: true,
11-
credentials: true,
12-
preflight: true
13-
})
14-
)
15-
.post('/', ({ body }) => body)
16-
.listen(8000, ({ port }) => {
17-
console.log(`Server is running on http://localhost:${port}`)
18-
19-
fetch('http://localhost:8000', {
20-
headers: {
21-
authorization: `Bearer 12345`
22-
}
23-
})
8+
.use(cors())
9+
.get('/home', () => {
10+
return 'Home'
2411
})
25-
26-
// console.log(app._handle.toString())
27-
// console.log(app.routes[0].compile().toString())

0 commit comments

Comments
 (0)