[{"data":1,"prerenderedAt":1394},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fpackages\u002Fuws-server":176,"\u002Fdocs\u002Fpackages\u002Fuws-server-surround":1389},[4,21,86,158],{"title":5,"path":6,"stem":7,"children":8,"status":11,"icon":20},"Getting Started","\u002Fdocs\u002Fgetting-started","1.docs\u002F1.getting-started\u002F1.index",[9,12,16],{"title":10,"path":6,"stem":7,"status":11},"Introduction",null,{"title":13,"path":14,"stem":15,"status":11},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","1.docs\u002F1.getting-started\u002F2.installation",{"title":17,"path":18,"stem":19,"status":11},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","1.docs\u002F1.getting-started\u002F3.quick-start",false,{"title":22,"path":23,"stem":24,"children":25,"status":11,"icon":20},"Core Concepts","\u002Fdocs\u002Fcore-concepts","1.docs\u002F2.core-concepts\u002F1.index",[26,28,32,36,46,50,54,58,62,66,70,74,78,82],{"title":27,"path":23,"stem":24,"status":11},"Overview",{"title":29,"path":30,"stem":31,"status":11},"Response","\u002Fdocs\u002Fcore-concepts\u002Fresponse","1.docs\u002F2.core-concepts\u002F10.response",{"title":33,"path":34,"stem":35,"status":11},"Testing","\u002Fdocs\u002Fcore-concepts\u002Ftesting","1.docs\u002F2.core-concepts\u002F12.testing",{"title":37,"path":38,"stem":39,"children":40,"status":11,"icon":20,"defaultOpen":20},"Decorators","\u002Fdocs\u002Fcore-concepts\u002Fdecorators","1.docs\u002F2.core-concepts\u002F13.decorators\u002F1.index",[41,42],{"title":27,"path":38,"stem":39,"status":11},{"title":43,"path":44,"stem":45,"status":11},"Custom","\u002Fdocs\u002Fcore-concepts\u002Fdecorators\u002Fcustom","1.docs\u002F2.core-concepts\u002F13.decorators\u002F2.custom",{"title":47,"path":48,"stem":49,"status":11},"Discovery Service","\u002Fdocs\u002Fcore-concepts\u002Fdiscovery","1.docs\u002F2.core-concepts\u002F14.discovery",{"title":51,"path":52,"stem":53,"status":11},"Application Lifecycle","\u002Fdocs\u002Fcore-concepts\u002Fapp-lifecycle","1.docs\u002F2.core-concepts\u002F15.app-lifecycle",{"title":55,"path":56,"stem":57,"status":11},"Controllers","\u002Fdocs\u002Fcore-concepts\u002Fcontrollers","1.docs\u002F2.core-concepts\u002F2.controllers",{"title":59,"path":60,"stem":61,"status":11},"Routing","\u002Fdocs\u002Fcore-concepts\u002Frouting","1.docs\u002F2.core-concepts\u002F3.routing",{"title":63,"path":64,"stem":65,"status":11},"Providers","\u002Fdocs\u002Fcore-concepts\u002Fproviders","1.docs\u002F2.core-concepts\u002F4.providers",{"title":67,"path":68,"stem":69,"status":11},"Modules","\u002Fdocs\u002Fcore-concepts\u002Fmodules","1.docs\u002F2.core-concepts\u002F5.modules",{"title":71,"path":72,"stem":73,"status":11},"Configuration","\u002Fdocs\u002Fcore-concepts\u002Fconfiguration","1.docs\u002F2.core-concepts\u002F6.configuration",{"title":75,"path":76,"stem":77,"status":11},"Middleware","\u002Fdocs\u002Fcore-concepts\u002Fmiddleware","1.docs\u002F2.core-concepts\u002F7.middleware",{"title":79,"path":80,"stem":81,"status":11},"Guards","\u002Fdocs\u002Fcore-concepts\u002Fguards","1.docs\u002F2.core-concepts\u002F8.guards",{"title":83,"path":84,"stem":85,"status":11},"Exceptions","\u002Fdocs\u002Fcore-concepts\u002Fexceptions","1.docs\u002F2.core-concepts\u002F9.exceptions",{"title":87,"path":88,"stem":89,"children":90,"status":11,"icon":20},"Packages","\u002Fdocs\u002Fpackages","1.docs\u002F3.packages\u002F1.index",[91,92,97,108,112,130,134,138,142,146,150,154],{"title":27,"path":88,"stem":89,"status":11},{"title":93,"path":94,"stem":95,"status":96},"CLI","\u002Fdocs\u002Fpackages\u002Fcli","1.docs\u002F3.packages\u002F10.cli","experimental",{"title":98,"path":99,"stem":100,"children":101,"status":11,"icon":20,"defaultOpen":20},"Events","\u002Fdocs\u002Fpackages\u002Fmessaging","1.docs\u002F3.packages\u002F11.messaging\u002F1.index",[102,104],{"title":27,"path":99,"stem":100,"status":103},"beta",{"title":105,"path":106,"stem":107,"status":96},"Redis","\u002Fdocs\u002Fpackages\u002Fmessaging\u002Fredis","1.docs\u002F3.packages\u002F11.messaging\u002F2.redis",{"title":109,"path":110,"stem":111,"status":103},"Serve Static","\u002Fdocs\u002Fpackages\u002Fserve-static","1.docs\u002F3.packages\u002F12.serve-static",{"title":113,"path":114,"stem":115,"children":116,"status":11,"icon":20,"defaultOpen":20},"Auth","\u002Fdocs\u002Fpackages\u002Fauth","1.docs\u002F3.packages\u002F2.auth\u002F1.index",[117,118,122,126],{"title":27,"path":114,"stem":115,"status":103},{"title":119,"path":120,"stem":121,"status":103},"JWT Provider","\u002Fdocs\u002Fpackages\u002Fauth\u002Fjwt","1.docs\u002F3.packages\u002F2.auth\u002F2.jwt",{"title":123,"path":124,"stem":125,"status":103},"Local Provider","\u002Fdocs\u002Fpackages\u002Fauth\u002Flocal","1.docs\u002F3.packages\u002F2.auth\u002F3.local",{"title":127,"path":128,"stem":129,"status":96},"OAuth2 Provider","\u002Fdocs\u002Fpackages\u002Fauth\u002Foauth2","1.docs\u002F3.packages\u002F2.auth\u002F4.oauth2",{"title":131,"path":132,"stem":133,"status":103},"JWT","\u002Fdocs\u002Fpackages\u002Fjwt","1.docs\u002F3.packages\u002F3.jwt",{"title":135,"path":136,"stem":137,"status":103},"Drizzle","\u002Fdocs\u002Fpackages\u002Fdrizzle","1.docs\u002F3.packages\u002F4.drizzle",{"title":139,"path":140,"stem":141,"status":103},"Papr","\u002Fdocs\u002Fpackages\u002Fpapr","1.docs\u002F3.packages\u002F5.papr",{"title":143,"path":144,"stem":145,"status":103},"Mongoose","\u002Fdocs\u002Fpackages\u002Fmongoose","1.docs\u002F3.packages\u002F6.mongoose",{"title":147,"path":148,"stem":149,"status":103},"Swagger","\u002Fdocs\u002Fpackages\u002Fswagger","1.docs\u002F3.packages\u002F7.swagger",{"title":151,"path":152,"stem":153,"status":103},"Node Server","\u002Fdocs\u002Fpackages\u002Fnode-server","1.docs\u002F3.packages\u002F8.node-server",{"title":155,"path":156,"stem":157,"status":103},"uWS Server","\u002Fdocs\u002Fpackages\u002Fuws-server","1.docs\u002F3.packages\u002F9.uws-server",{"title":159,"path":160,"stem":161,"children":162,"status":11,"icon":20},"Roadmap","\u002Fdocs\u002Froadmap","1.docs\u002F4.roadmap\u002F1.index",[163,164,168,172],{"title":27,"path":160,"stem":161,"status":11},{"title":165,"path":166,"stem":167,"status":11},"Short term (0-3 months)","\u002Fdocs\u002Froadmap\u002Fshort-term","1.docs\u002F4.roadmap\u002F2.short-term",{"title":169,"path":170,"stem":171,"status":11},"Mid term (3-9 months)","\u002Fdocs\u002Froadmap\u002Fmid-term","1.docs\u002F4.roadmap\u002F3.mid-term",{"title":173,"path":174,"stem":175,"status":11},"Long term (9-12+ months)","\u002Fdocs\u002Froadmap\u002Flong-term","1.docs\u002F4.roadmap\u002F4.long-term",{"id":177,"title":155,"body":178,"description":1384,"extension":1385,"meta":1386,"navigation":356,"path":156,"seo":1387,"status":103,"stem":157,"__hash__":1388},"docs\u002F1.docs\u002F3.packages\u002F9.uws-server.md",{"type":179,"value":180,"toc":1371},"minimark",[181,201,205,286,291,295,421,424,457,461,475,479,484,487,561,565,644,652,656,774,778,900,923,927,933,947,952,963,970,973,982,1353,1367],[182,183,184,188,189,196,197,200],"p",{},[185,186,187],"code",{},"@miiajs\u002Fuws-server"," provides a high-performance HTTP server adapter using ",[190,191,195],"a",{"href":192,"rel":193},"https:\u002F\u002Fgithub.com\u002FuNetworking\u002FuWebSockets.js",[194],"nofollow","uWebSockets.js"," - a C++ networking library that is significantly faster than Node.js's built-in ",[185,198,199],{},"http"," module.",[202,203,13],"h2",{"id":204},"installation",[206,207,208,236,254,270],"code-group",{},[209,210,216],"pre",{"className":211,"code":212,"filename":213,"language":214,"meta":215,"style":215},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","bun add @miiajs\u002Fuws-server uWebSockets.js@uNetworking\u002FuWebSockets.js#v20.64.0\n","bun","bash","",[185,217,218],{"__ignoreMap":215},[219,220,223,226,230,233],"span",{"class":221,"line":222},"line",1,[219,224,213],{"class":225},"sBMFI",[219,227,229],{"class":228},"sfazB"," add",[219,231,232],{"class":228}," @miiajs\u002Fuws-server",[219,234,235],{"class":228}," uWebSockets.js@uNetworking\u002FuWebSockets.js#v20.64.0\n",[209,237,240],{"className":211,"code":238,"filename":239,"language":214,"meta":215,"style":215},"npm install @miiajs\u002Fuws-server uNetworking\u002FuWebSockets.js#v20.64.0\n","npm",[185,241,242],{"__ignoreMap":215},[219,243,244,246,249,251],{"class":221,"line":222},[219,245,239],{"class":225},[219,247,248],{"class":228}," install",[219,250,232],{"class":228},[219,252,253],{"class":228}," uNetworking\u002FuWebSockets.js#v20.64.0\n",[209,255,258],{"className":211,"code":256,"filename":257,"language":214,"meta":215,"style":215},"pnpm add @miiajs\u002Fuws-server uNetworking\u002FuWebSockets.js#v20.64.0\n","pnpm",[185,259,260],{"__ignoreMap":215},[219,261,262,264,266,268],{"class":221,"line":222},[219,263,257],{"class":225},[219,265,229],{"class":228},[219,267,232],{"class":228},[219,269,253],{"class":228},[209,271,274],{"className":211,"code":272,"filename":273,"language":214,"meta":215,"style":215},"yarn add @miiajs\u002Fuws-server uNetworking\u002FuWebSockets.js#v20.64.0\n","yarn",[185,275,276],{"__ignoreMap":215},[219,277,278,280,282,284],{"class":221,"line":222},[219,279,273],{"class":225},[219,281,229],{"class":228},[219,283,232],{"class":228},[219,285,253],{"class":228},[182,287,288,290],{},[185,289,195],{}," is installed directly from GitHub - the package is not published to npm.",[202,292,294],{"id":293},"usage","Usage",[209,296,300],{"className":297,"code":298,"language":299,"meta":215,"style":215},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Miia } from '@miiajs\u002Fcore'\nimport { serve } from '@miiajs\u002Fuws-server'\n\nconst app = new Miia().register(AppModule)\n\nawait app.listen(3000, serve)\n","typescript",[185,301,302,331,351,358,389,394],{"__ignoreMap":215},[219,303,304,308,312,316,319,322,325,328],{"class":221,"line":222},[219,305,307],{"class":306},"s7zQu","import",[219,309,311],{"class":310},"sMK4o"," {",[219,313,315],{"class":314},"sTEyZ"," Miia",[219,317,318],{"class":310}," }",[219,320,321],{"class":306}," from",[219,323,324],{"class":310}," '",[219,326,327],{"class":228},"@miiajs\u002Fcore",[219,329,330],{"class":310},"'\n",[219,332,334,336,338,341,343,345,347,349],{"class":221,"line":333},2,[219,335,307],{"class":306},[219,337,311],{"class":310},[219,339,340],{"class":314}," serve",[219,342,318],{"class":310},[219,344,321],{"class":306},[219,346,324],{"class":310},[219,348,187],{"class":228},[219,350,330],{"class":310},[219,352,354],{"class":221,"line":353},3,[219,355,357],{"emptyLinePlaceholder":356},true,"\n",[219,359,361,365,368,371,374,377,380,383,386],{"class":221,"line":360},4,[219,362,364],{"class":363},"spNyl","const",[219,366,367],{"class":314}," app ",[219,369,370],{"class":310},"=",[219,372,373],{"class":310}," new",[219,375,315],{"class":376},"s2Zo4",[219,378,379],{"class":314},"()",[219,381,382],{"class":310},".",[219,384,385],{"class":376},"register",[219,387,388],{"class":314},"(AppModule)\n",[219,390,392],{"class":221,"line":391},5,[219,393,357],{"emptyLinePlaceholder":356},[219,395,397,400,403,405,408,411,415,418],{"class":221,"line":396},6,[219,398,399],{"class":306},"await",[219,401,402],{"class":314}," app",[219,404,382],{"class":310},[219,406,407],{"class":376},"listen",[219,409,410],{"class":314},"(",[219,412,414],{"class":413},"sbssI","3000",[219,416,417],{"class":310},",",[219,419,420],{"class":314}," serve)\n",[182,422,423],{},"With custom hostname:",[209,425,427],{"className":297,"code":426,"language":299,"meta":215,"style":215},"await app.listen(3000, '0.0.0.0', serve)\n",[185,428,429],{"__ignoreMap":215},[219,430,431,433,435,437,439,441,443,445,447,450,453,455],{"class":221,"line":222},[219,432,399],{"class":306},[219,434,402],{"class":314},[219,436,382],{"class":310},[219,438,407],{"class":376},[219,440,410],{"class":314},[219,442,414],{"class":413},[219,444,417],{"class":310},[219,446,324],{"class":310},[219,448,449],{"class":228},"0.0.0.0",[219,451,452],{"class":310},"'",[219,454,417],{"class":310},[219,456,420],{"class":314},[202,458,460],{"id":459},"how-it-works","How it works",[182,462,463,464,467,468,470,471,474],{},"The adapter converts uWebSockets.js request\u002Fresponse objects to the Web Standard ",[185,465,466],{},"Request","\u002F",[185,469,29],{}," API that MiiaJS expects. Since uWS ",[185,472,473],{},"HttpRequest"," is only valid synchronously, all metadata (method, URL, headers) is captured before any async gap.",[202,476,478],{"id":477},"performance-modes","Performance modes",[480,481,483],"h3",{"id":482},"optimized-mode-default","Optimized mode (default)",[182,485,486],{},"Minimizes allocations on the hot path:",[488,489,490,502,512,529,542,551],"ul",{},[491,492,493,497,498,501],"li",{},[494,495,496],"strong",{},"Lazy Request Proxy"," - lightweight object instead of ",[185,499,500],{},"new Request()",". Method, URL, headers, and body are resolved only on first access.",[491,503,504,507,508,511],{},[494,505,506],{},"Lightweight Headers"," - linear scan over header pairs instead of constructing a ",[185,509,510],{},"Headers"," object. uWS provides lowercase keys natively, so lookups are direct string comparisons.",[491,513,514,517,518,521,522,525,526,528],{},[494,515,516],{},"Body Buffering"," - small POST bodies (Content-Length ≤ ",[185,519,520],{},"bufferThreshold",") are buffered and parsed directly, bypassing ",[185,523,524],{},"ReadableStream"," and ",[185,527,466],{}," creation. Large or chunked bodies fall back to streaming.",[491,530,531,534,535,538,539,541],{},[494,532,533],{},"LightResponse Cache"," - simple responses (string, null, Uint8Array) store a ",[185,536,537],{},"[status, body, headers]"," tuple without creating a real ",[185,540,29],{}," object.",[491,543,544,547,548,382],{},[494,545,546],{},"Corked Writes"," - batches header + body writes into a single syscall via ",[185,549,550],{},"res.cork()",[491,552,553,556,557,560],{},[494,554,555],{},"Sync Fast Path"," - synchronous handlers bypass ",[185,558,559],{},"Promise"," allocation entirely.",[480,562,564],{"id":563},"native-mode","Native mode",[209,566,568],{"className":297,"code":567,"language":299,"meta":215,"style":215},"const server = await serve({\n  fetch: app.fetch,\n  port: 3000,\n  mode: 'native',\n})\n",[185,569,570,589,608,620,636],{"__ignoreMap":215},[219,571,572,574,577,579,582,584,586],{"class":221,"line":222},[219,573,364],{"class":363},[219,575,576],{"class":314}," server ",[219,578,370],{"class":310},[219,580,581],{"class":306}," await",[219,583,340],{"class":376},[219,585,410],{"class":314},[219,587,588],{"class":310},"{\n",[219,590,591,595,598,600,602,605],{"class":221,"line":333},[219,592,594],{"class":593},"swJcz","  fetch",[219,596,597],{"class":310},":",[219,599,402],{"class":314},[219,601,382],{"class":310},[219,603,604],{"class":314},"fetch",[219,606,607],{"class":310},",\n",[219,609,610,613,615,618],{"class":221,"line":353},[219,611,612],{"class":593},"  port",[219,614,597],{"class":310},[219,616,617],{"class":413}," 3000",[219,619,607],{"class":310},[219,621,622,625,627,629,632,634],{"class":221,"line":360},[219,623,624],{"class":593},"  mode",[219,626,597],{"class":310},[219,628,324],{"class":310},[219,630,631],{"class":228},"native",[219,633,452],{"class":310},[219,635,607],{"class":310},[219,637,638,641],{"class":221,"line":391},[219,639,640],{"class":310},"}",[219,642,643],{"class":314},")\n",[182,645,646,647,525,649,651],{},"Full Web API compliance with standard ",[185,648,466],{},[185,650,29],{}," objects. Use when strict spec conformance is needed.",[202,653,655],{"id":654},"standalone-usage","Standalone usage",[209,657,659],{"className":297,"code":658,"language":299,"meta":215,"style":215},"import { serve } from '@miiajs\u002Fuws-server'\n\nconst server = await serve({\n  fetch: (req) => new Response('Hello, World!'),\n  port: 8080,\n})\n\nawait server.close()\n",[185,660,661,679,683,699,736,747,753,758],{"__ignoreMap":215},[219,662,663,665,667,669,671,673,675,677],{"class":221,"line":222},[219,664,307],{"class":306},[219,666,311],{"class":310},[219,668,340],{"class":314},[219,670,318],{"class":310},[219,672,321],{"class":306},[219,674,324],{"class":310},[219,676,187],{"class":228},[219,678,330],{"class":310},[219,680,681],{"class":221,"line":333},[219,682,357],{"emptyLinePlaceholder":356},[219,684,685,687,689,691,693,695,697],{"class":221,"line":353},[219,686,364],{"class":363},[219,688,576],{"class":314},[219,690,370],{"class":310},[219,692,581],{"class":306},[219,694,340],{"class":376},[219,696,410],{"class":314},[219,698,588],{"class":310},[219,700,701,703,705,708,712,715,718,720,723,725,727,730,732,734],{"class":221,"line":360},[219,702,594],{"class":376},[219,704,597],{"class":310},[219,706,707],{"class":310}," (",[219,709,711],{"class":710},"sHdIc","req",[219,713,714],{"class":310},")",[219,716,717],{"class":363}," =>",[219,719,373],{"class":310},[219,721,722],{"class":376}," Response",[219,724,410],{"class":314},[219,726,452],{"class":310},[219,728,729],{"class":228},"Hello, World!",[219,731,452],{"class":310},[219,733,714],{"class":314},[219,735,607],{"class":310},[219,737,738,740,742,745],{"class":221,"line":391},[219,739,612],{"class":593},[219,741,597],{"class":310},[219,743,744],{"class":413}," 8080",[219,746,607],{"class":310},[219,748,749,751],{"class":221,"line":396},[219,750,640],{"class":310},[219,752,643],{"class":314},[219,754,756],{"class":221,"line":755},7,[219,757,357],{"emptyLinePlaceholder":356},[219,759,761,763,766,768,771],{"class":221,"line":760},8,[219,762,399],{"class":306},[219,764,765],{"class":314}," server",[219,767,382],{"class":310},[219,769,770],{"class":376},"close",[219,772,773],{"class":314},"()\n",[202,775,777],{"id":776},"options","Options",[209,779,781],{"className":297,"code":780,"language":299,"meta":215,"style":215},"interface ServeOptions {\n  fetch: (req: Request) => Response | Promise\u003CResponse>  \u002F\u002F Required\n  port?: number              \u002F\u002F Default: 3000\n  hostname?: string          \u002F\u002F Default: '0.0.0.0'\n  mode?: 'optimized' | 'native'  \u002F\u002F Default: 'optimized'\n  bufferThreshold?: number   \u002F\u002F Default: 102400 (100KB)\n}\n",[185,782,783,794,833,846,859,883,895],{"__ignoreMap":215},[219,784,785,788,791],{"class":221,"line":222},[219,786,787],{"class":363},"interface",[219,789,790],{"class":225}," ServeOptions",[219,792,793],{"class":310}," {\n",[219,795,796,798,800,802,804,806,809,811,813,815,818,821,824,826,829],{"class":221,"line":333},[219,797,594],{"class":593},[219,799,597],{"class":310},[219,801,707],{"class":310},[219,803,711],{"class":710},[219,805,597],{"class":310},[219,807,808],{"class":225}," Request",[219,810,714],{"class":310},[219,812,717],{"class":363},[219,814,722],{"class":225},[219,816,817],{"class":310}," |",[219,819,820],{"class":225}," Promise",[219,822,823],{"class":310},"\u003C",[219,825,29],{"class":225},[219,827,828],{"class":310},">",[219,830,832],{"class":831},"sHwdD","  \u002F\u002F Required\n",[219,834,835,837,840,843],{"class":221,"line":353},[219,836,612],{"class":593},[219,838,839],{"class":310},"?:",[219,841,842],{"class":225}," number",[219,844,845],{"class":831},"              \u002F\u002F Default: 3000\n",[219,847,848,851,853,856],{"class":221,"line":360},[219,849,850],{"class":593},"  hostname",[219,852,839],{"class":310},[219,854,855],{"class":225}," string",[219,857,858],{"class":831},"          \u002F\u002F Default: '0.0.0.0'\n",[219,860,861,863,865,867,870,872,874,876,878,880],{"class":221,"line":391},[219,862,624],{"class":593},[219,864,839],{"class":310},[219,866,324],{"class":310},[219,868,869],{"class":228},"optimized",[219,871,452],{"class":310},[219,873,817],{"class":310},[219,875,324],{"class":310},[219,877,631],{"class":228},[219,879,452],{"class":310},[219,881,882],{"class":831},"  \u002F\u002F Default: 'optimized'\n",[219,884,885,888,890,892],{"class":221,"line":396},[219,886,887],{"class":593},"  bufferThreshold",[219,889,839],{"class":310},[219,891,842],{"class":225},[219,893,894],{"class":831},"   \u002F\u002F Default: 102400 (100KB)\n",[219,896,897],{"class":221,"line":755},[219,898,899],{"class":310},"}\n",[182,901,902,903,905,906,909,910,467,913,916,917,919,920,922],{},"The ",[185,904,520],{}," controls the body buffering optimization in optimized mode. POST\u002FPUT\u002FPATCH bodies with a known ",[185,907,908],{},"Content-Length"," up to this size are buffered in memory for fast ",[185,911,912],{},"json()",[185,914,915],{},"text()"," access. Bodies without ",[185,918,908],{}," or larger than the threshold use ",[185,921,524],{}," for streaming.",[202,924,926],{"id":925},"when-to-use","When to use",[182,928,929,930,932],{},"Choose ",[185,931,187],{}," when:",[488,934,935,938,944],{},[491,936,937],{},"Maximum throughput is critical",[491,939,940,941,943],{},"You're running on Node.js and need higher performance than the built-in ",[185,942,199],{}," module",[491,945,946],{},"You're comfortable with native binary dependencies",[182,948,929,949,932],{},[185,950,951],{},"@miiajs\u002Fnode-server",[488,953,954,957,960],{},[491,955,956],{},"You prefer zero native dependencies",[491,958,959],{},"You need broader platform compatibility",[491,961,962],{},"Performance is sufficient with the Node.js adapter",[182,964,965,966,969],{},"On Bun and Deno, no adapter is needed - ",[185,967,968],{},"app.listen()"," auto-detects the runtime.",[202,971,33],{"id":972},"testing",[182,974,975,977,978,981],{},[185,976,187],{}," is exercised directly via ",[185,979,980],{},"serve()",". Tests must run under Node.js - the native uWS binary does not load on Bun or Deno.",[209,983,985],{"className":297,"code":984,"language":299,"meta":215,"style":215},"\u002F\u002F node --experimental-strip-types --no-warnings --test\nimport { afterEach, describe, it } from 'node:test'\nimport assert from 'node:assert\u002Fstrict'\nimport { serve } from '@miiajs\u002Fuws-server'\n\nlet server: { close(): Promise\u003Cvoid> }\n\nafterEach(async () => {\n  if (server) await server.close()\n})\n\nit('handles GET requests', async () => {\n  server = await serve({\n    port: 19234,\n    fetch: () => Response.json({ ok: true }),\n  })\n\n  const res = await fetch('http:\u002F\u002Flocalhost:19234\u002F')\n  assert.equal(res.status, 200)\n  assert.deepEqual(await res.json(), { ok: true })\n})\n",[185,986,987,992,1022,1039,1057,1061,1090,1094,1111,1135,1142,1147,1173,1190,1203,1242,1250,1255,1282,1310,1346],{"__ignoreMap":215},[219,988,989],{"class":221,"line":222},[219,990,991],{"class":831},"\u002F\u002F node --experimental-strip-types --no-warnings --test\n",[219,993,994,996,998,1001,1003,1006,1008,1011,1013,1015,1017,1020],{"class":221,"line":333},[219,995,307],{"class":306},[219,997,311],{"class":310},[219,999,1000],{"class":314}," afterEach",[219,1002,417],{"class":310},[219,1004,1005],{"class":314}," describe",[219,1007,417],{"class":310},[219,1009,1010],{"class":314}," it",[219,1012,318],{"class":310},[219,1014,321],{"class":306},[219,1016,324],{"class":310},[219,1018,1019],{"class":228},"node:test",[219,1021,330],{"class":310},[219,1023,1024,1026,1029,1032,1034,1037],{"class":221,"line":353},[219,1025,307],{"class":306},[219,1027,1028],{"class":314}," assert ",[219,1030,1031],{"class":306},"from",[219,1033,324],{"class":310},[219,1035,1036],{"class":228},"node:assert\u002Fstrict",[219,1038,330],{"class":310},[219,1040,1041,1043,1045,1047,1049,1051,1053,1055],{"class":221,"line":360},[219,1042,307],{"class":306},[219,1044,311],{"class":310},[219,1046,340],{"class":314},[219,1048,318],{"class":310},[219,1050,321],{"class":306},[219,1052,324],{"class":310},[219,1054,187],{"class":228},[219,1056,330],{"class":310},[219,1058,1059],{"class":221,"line":391},[219,1060,357],{"emptyLinePlaceholder":356},[219,1062,1063,1066,1068,1070,1072,1075,1078,1080,1082,1085,1087],{"class":221,"line":396},[219,1064,1065],{"class":363},"let",[219,1067,765],{"class":314},[219,1069,597],{"class":310},[219,1071,311],{"class":310},[219,1073,1074],{"class":593}," close",[219,1076,1077],{"class":310},"():",[219,1079,820],{"class":225},[219,1081,823],{"class":310},[219,1083,1084],{"class":225},"void",[219,1086,828],{"class":310},[219,1088,1089],{"class":310}," }\n",[219,1091,1092],{"class":221,"line":755},[219,1093,357],{"emptyLinePlaceholder":356},[219,1095,1096,1099,1101,1104,1107,1109],{"class":221,"line":760},[219,1097,1098],{"class":376},"afterEach",[219,1100,410],{"class":314},[219,1102,1103],{"class":363},"async",[219,1105,1106],{"class":310}," ()",[219,1108,717],{"class":363},[219,1110,793],{"class":310},[219,1112,1114,1117,1119,1122,1125,1127,1129,1131,1133],{"class":221,"line":1113},9,[219,1115,1116],{"class":306},"  if",[219,1118,707],{"class":593},[219,1120,1121],{"class":314},"server",[219,1123,1124],{"class":593},") ",[219,1126,399],{"class":306},[219,1128,765],{"class":314},[219,1130,382],{"class":310},[219,1132,770],{"class":376},[219,1134,773],{"class":593},[219,1136,1138,1140],{"class":221,"line":1137},10,[219,1139,640],{"class":310},[219,1141,643],{"class":314},[219,1143,1145],{"class":221,"line":1144},11,[219,1146,357],{"emptyLinePlaceholder":356},[219,1148,1150,1153,1155,1157,1160,1162,1164,1167,1169,1171],{"class":221,"line":1149},12,[219,1151,1152],{"class":376},"it",[219,1154,410],{"class":314},[219,1156,452],{"class":310},[219,1158,1159],{"class":228},"handles GET requests",[219,1161,452],{"class":310},[219,1163,417],{"class":310},[219,1165,1166],{"class":363}," async",[219,1168,1106],{"class":310},[219,1170,717],{"class":363},[219,1172,793],{"class":310},[219,1174,1176,1179,1182,1184,1186,1188],{"class":221,"line":1175},13,[219,1177,1178],{"class":314},"  server",[219,1180,1181],{"class":310}," =",[219,1183,581],{"class":306},[219,1185,340],{"class":376},[219,1187,410],{"class":593},[219,1189,588],{"class":310},[219,1191,1193,1196,1198,1201],{"class":221,"line":1192},14,[219,1194,1195],{"class":593},"    port",[219,1197,597],{"class":310},[219,1199,1200],{"class":413}," 19234",[219,1202,607],{"class":310},[219,1204,1206,1209,1211,1213,1215,1217,1219,1222,1224,1227,1230,1232,1236,1238,1240],{"class":221,"line":1205},15,[219,1207,1208],{"class":376},"    fetch",[219,1210,597],{"class":310},[219,1212,1106],{"class":310},[219,1214,717],{"class":363},[219,1216,722],{"class":314},[219,1218,382],{"class":310},[219,1220,1221],{"class":376},"json",[219,1223,410],{"class":593},[219,1225,1226],{"class":310},"{",[219,1228,1229],{"class":593}," ok",[219,1231,597],{"class":310},[219,1233,1235],{"class":1234},"sfNiH"," true",[219,1237,318],{"class":310},[219,1239,714],{"class":593},[219,1241,607],{"class":310},[219,1243,1245,1248],{"class":221,"line":1244},16,[219,1246,1247],{"class":310},"  }",[219,1249,643],{"class":593},[219,1251,1253],{"class":221,"line":1252},17,[219,1254,357],{"emptyLinePlaceholder":356},[219,1256,1258,1261,1264,1266,1268,1271,1273,1275,1278,1280],{"class":221,"line":1257},18,[219,1259,1260],{"class":363},"  const",[219,1262,1263],{"class":314}," res",[219,1265,1181],{"class":310},[219,1267,581],{"class":306},[219,1269,1270],{"class":376}," fetch",[219,1272,410],{"class":593},[219,1274,452],{"class":310},[219,1276,1277],{"class":228},"http:\u002F\u002Flocalhost:19234\u002F",[219,1279,452],{"class":310},[219,1281,643],{"class":593},[219,1283,1285,1288,1290,1293,1295,1298,1300,1303,1305,1308],{"class":221,"line":1284},19,[219,1286,1287],{"class":314},"  assert",[219,1289,382],{"class":310},[219,1291,1292],{"class":376},"equal",[219,1294,410],{"class":593},[219,1296,1297],{"class":314},"res",[219,1299,382],{"class":310},[219,1301,1302],{"class":314},"status",[219,1304,417],{"class":310},[219,1306,1307],{"class":413}," 200",[219,1309,643],{"class":593},[219,1311,1313,1315,1317,1320,1322,1324,1326,1328,1330,1332,1334,1336,1338,1340,1342,1344],{"class":221,"line":1312},20,[219,1314,1287],{"class":314},[219,1316,382],{"class":310},[219,1318,1319],{"class":376},"deepEqual",[219,1321,410],{"class":593},[219,1323,399],{"class":306},[219,1325,1263],{"class":314},[219,1327,382],{"class":310},[219,1329,1221],{"class":376},[219,1331,379],{"class":593},[219,1333,417],{"class":310},[219,1335,311],{"class":310},[219,1337,1229],{"class":593},[219,1339,597],{"class":310},[219,1341,1235],{"class":1234},[219,1343,318],{"class":310},[219,1345,643],{"class":593},[219,1347,1349,1351],{"class":221,"line":1348},21,[219,1350,640],{"class":310},[219,1352,643],{"class":314},[182,1354,1355,1356,1359,1360,1363,1364,1366],{},"For applications that wire the adapter through ",[185,1357,1358],{},"app.listen(port, host, serve)",", prefer the ",[185,1361,1362],{},"TestApp"," pattern from ",[190,1365,33],{"href":34}," - it runs handlers without binding a port and works under any runtime.",[1368,1369,1370],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":215,"searchDepth":333,"depth":333,"links":1372},[1373,1374,1375,1376,1380,1381,1382,1383],{"id":204,"depth":333,"text":13},{"id":293,"depth":333,"text":294},{"id":459,"depth":333,"text":460},{"id":477,"depth":333,"text":478,"children":1377},[1378,1379],{"id":482,"depth":353,"text":483},{"id":563,"depth":353,"text":564},{"id":654,"depth":333,"text":655},{"id":776,"depth":333,"text":777},{"id":925,"depth":333,"text":926},{"id":972,"depth":333,"text":33},"uWebSockets.js HTTP server adapter for maximum throughput.","md",{},{"title":155,"description":1384},"T8ofu1KJCzdcZomzHpoOcLwr3Q94zvwaBBdngD1unBk",[1390,1392],{"title":151,"path":152,"stem":153,"description":1391,"children":-1},"Node.js HTTP server adapter with optimized request\u002Fresponse handling.",{"title":27,"path":160,"stem":161,"description":1393,"children":-1},"Public roadmap for MiiaJS - what is shipped, what is coming, and how items are prioritized.",1778575274467]