File tree Expand file tree Collapse file tree 2 files changed +5
-20
lines changed
Expand file tree Collapse file tree 2 files changed +5
-20
lines changed Original file line number Diff line number Diff line change 11# 1.2.4 - 9 Jan 2024
22Bug 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
Original file line number Diff line number Diff line change 1- import { Elysia } from 'elysia'
1+ import { Elysia , t } from 'elysia'
22import { node } from '../src'
33import cors from '@elysiajs/cors'
44
55const 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())
You can’t perform that action at this time.
0 commit comments