[{"data":1,"prerenderedAt":2278},["ShallowReactive",2],{"navigation":3,"-guide-options":61,"-guide-options-surround":2273},[4],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","/guide","1.guide/01.index",[9,11,16,21,26,31,36,41,46,51,56],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Fetch Handler","/guide/handler","1.guide/02.handler","i-fluent:target-24-regular",{"title":17,"path":18,"stem":19,"icon":20},"Server Instance","/guide/server","1.guide/03.server","radix-icons:component-instance",{"title":22,"path":23,"stem":24,"icon":25},"Middleware","/guide/middleware","1.guide/04.middleware","clarity:plugin-line",{"title":27,"path":28,"stem":29,"icon":30},"Server Options","/guide/options","1.guide/05.options","ri:settings-3-line",{"title":32,"path":33,"stem":34,"icon":35},"TLS","/guide/tls","1.guide/06.tls","ri:lock-2-line",{"title":37,"path":38,"stem":39,"icon":40},"Bundler Usage","/guide/bundler","1.guide/07.bundler","clarity:bundle-line",{"title":42,"path":43,"stem":44,"icon":45},"Node.js Support","/guide/node","1.guide/08.node","akar-icons:node-fill",{"title":47,"path":48,"stem":49,"icon":50},"Using CLI","/guide/cli","1.guide/10.cli","garden:terminal-cli-stroke-12",{"title":52,"path":53,"stem":54,"icon":55},"Body Size Limiting","/guide/body-limit","1.guide/11.body-limit","ri:scales-3-line",{"title":57,"path":58,"stem":59,"icon":60},"AWS Lambda","/guide/aws-lambda","1.guide/9.aws-lambda","clarity:cloud-traffic-line",{"id":62,"title":27,"body":63,"description":2267,"extension":2268,"meta":2269,"navigation":2270,"path":28,"seo":2271,"stem":29,"__hash__":2272},"content/1.guide/05.options.md",{"type":64,"value":65,"toc":2244,"icon":30},"minimark",[66,75,228,231,241,246,252,255,265,275,280,283,301,310,316,319,329,334,341,346,365,466,471,480,613,616,621,630,740,749,754,757,767,787,792,795,800,866,871,891,904,914,917,922,932,939,943,1068,1074,1085,1112,1140,1144,1312,1352,1361,1367,1398,1413,1451,1456,1478,1498,1519,1523,1596,1601,1605,1609,1613,1709,1725,1728,1732,1853,1858,1861,1865,1984,1990,1994,2000,2085,2098,2102,2105,2240],[67,68,69,70,74],"p",{},"When starting a new server, in addition to main ",[71,72,73],"code",{},"fetch"," handler, you can provide additional options to customize listening server.",[76,77,82],"pre",{"className":78,"code":79,"language":80,"meta":81,"style":81},"language-js shiki shiki-themes github-light github-dark github-dark","import { serve } from \"srvx\";\n\nserve({\n  // Generic options\n  port: 3000,\n  hostname: \"localhost\",\n\n  // Runtime specific options\n  node: {},\n  bun: {},\n  deno: {},\n\n  // Main server handler\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n","js","",[71,83,84,107,114,124,131,144,155,160,166,172,178,184,189,195,222],{"__ignoreMap":81},[85,86,89,93,97,100,104],"span",{"class":87,"line":88},"line",1,[85,90,92],{"class":91},"so5gQ","import",[85,94,96],{"class":95},"slsVL"," { serve } ",[85,98,99],{"class":91},"from",[85,101,103],{"class":102},"sfrk1"," \"srvx\"",[85,105,106],{"class":95},";\n",[85,108,110],{"class":87,"line":109},2,[85,111,113],{"emptyLinePlaceholder":112},true,"\n",[85,115,117,121],{"class":87,"line":116},3,[85,118,120],{"class":119},"shcOC","serve",[85,122,123],{"class":95},"({\n",[85,125,127],{"class":87,"line":126},4,[85,128,130],{"class":129},"sCsY4","  // Generic options\n",[85,132,134,137,141],{"class":87,"line":133},5,[85,135,136],{"class":95},"  port: ",[85,138,140],{"class":139},"suiK_","3000",[85,142,143],{"class":95},",\n",[85,145,147,150,153],{"class":87,"line":146},6,[85,148,149],{"class":95},"  hostname: ",[85,151,152],{"class":102},"\"localhost\"",[85,154,143],{"class":95},[85,156,158],{"class":87,"line":157},7,[85,159,113],{"emptyLinePlaceholder":112},[85,161,163],{"class":87,"line":162},8,[85,164,165],{"class":129},"  // Runtime specific options\n",[85,167,169],{"class":87,"line":168},9,[85,170,171],{"class":95},"  node: {},\n",[85,173,175],{"class":87,"line":174},10,[85,176,177],{"class":95},"  bun: {},\n",[85,179,181],{"class":87,"line":180},11,[85,182,183],{"class":95},"  deno: {},\n",[85,185,187],{"class":87,"line":186},12,[85,188,113],{"emptyLinePlaceholder":112},[85,190,192],{"class":87,"line":191},13,[85,193,194],{"class":129},"  // Main server handler\n",[85,196,198,201,204,207,210,213,216,219],{"class":87,"line":197},14,[85,199,200],{"class":119},"  fetch",[85,202,203],{"class":95},": () ",[85,205,206],{"class":91},"=>",[85,208,209],{"class":91}," new",[85,211,212],{"class":119}," Response",[85,214,215],{"class":95},"(",[85,217,218],{"class":102},"\"👋 Hello there!\"",[85,220,221],{"class":95},"),\n",[85,223,225],{"class":87,"line":224},15,[85,226,227],{"class":95},"});\n",[67,229,230],{},"There are two kind of options:",[232,233,234,238],"ul",{},[235,236,237],"li",{},"Generic options: Top level options are intended to have exactly same functionality regardless of runtime",[235,239,240],{},"Runtime specific: Allow customizing more runtime specific options",[242,243,245],"h2",{"id":244},"generic-options","Generic Options",[247,248,250],"h3",{"id":249},"port",[71,251,249],{},[67,253,254],{},"The port server should be listening to.",[67,256,257,258,261,262,264],{},"Default is value of ",[71,259,260],{},"PORT"," environment variable or ",[71,263,140],{},".",[266,267,268],"tip",{},[67,269,270,271,274],{},"\nYou can set the port to ",[71,272,273],{},"0"," to use a random port.",[247,276,278],{"id":277},"hostname",[71,279,277],{},[67,281,282],{},"The hostname (IP or resolvable host) server listener should bound to.",[67,284,285,286,289,290,292,293,295,296,300],{},"Default is value of the ",[71,287,288],{},"HOST"," environment variable, if set. When neither ",[71,291,277],{}," nor ",[71,294,288],{}," is provided, the server will ",[297,298,299],"strong",{},"listen to all network interfaces"," by default.",[302,303,304],"important",{},[67,305,306,307,264],{},"\nIf you are running a server that should not be exposed to the network, use ",[71,308,309],{},"localhost",[247,311,313],{"id":312},"reuseport",[71,314,315],{},"reusePort",[67,317,318],{},"Enabling this option allows multiple processes to bind to the same port, which is useful for load balancing.",[320,321,322],"note",{},[67,323,324,325,328],{},"\nDespite Node.js built-in behavior that has ",[71,326,327],{},"exclusive"," flag enabled by default, srvx uses non-exclusive mode for consistency.",[247,330,332],{"id":331},"silent",[71,333,331],{},[67,335,336,337,340],{},"If enabled, no server listening message will be printed (enabled by default when ",[71,338,339],{},"TEST"," environment variable is set).",[247,342,344],{"id":343},"manual",[71,345,343],{},[67,347,348,349,352,353,356,357,364],{},"If set to ",[71,350,351],{},"true",", the server will ",[297,354,355],{},"not"," start listening automatically. You must call ",[358,359,361],"a",{"href":360},"/guide/server#serverserve",[71,362,363],{},"server.serve()"," yourself to begin accepting connections. Useful when you need to fully construct the server before it starts.",[76,366,368],{"className":78,"code":367,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nconst server = serve({\n  manual: true,\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n\n// ...later\nawait server.serve();\nawait server.ready();\n",[71,369,370,382,386,402,411,429,433,437,442,455],{"__ignoreMap":81},[85,371,372,374,376,378,380],{"class":87,"line":88},[85,373,92],{"class":91},[85,375,96],{"class":95},[85,377,99],{"class":91},[85,379,103],{"class":102},[85,381,106],{"class":95},[85,383,384],{"class":87,"line":109},[85,385,113],{"emptyLinePlaceholder":112},[85,387,388,391,394,397,400],{"class":87,"line":116},[85,389,390],{"class":91},"const",[85,392,393],{"class":139}," server",[85,395,396],{"class":91}," =",[85,398,399],{"class":119}," serve",[85,401,123],{"class":95},[85,403,404,407,409],{"class":87,"line":126},[85,405,406],{"class":95},"  manual: ",[85,408,351],{"class":139},[85,410,143],{"class":95},[85,412,413,415,417,419,421,423,425,427],{"class":87,"line":133},[85,414,200],{"class":119},[85,416,203],{"class":95},[85,418,206],{"class":91},[85,420,209],{"class":91},[85,422,212],{"class":119},[85,424,215],{"class":95},[85,426,218],{"class":102},[85,428,221],{"class":95},[85,430,431],{"class":87,"line":146},[85,432,227],{"class":95},[85,434,435],{"class":87,"line":157},[85,436,113],{"emptyLinePlaceholder":112},[85,438,439],{"class":87,"line":162},[85,440,441],{"class":129},"// ...later\n",[85,443,444,447,450,452],{"class":87,"line":168},[85,445,446],{"class":91},"await",[85,448,449],{"class":95}," server.",[85,451,120],{"class":119},[85,453,454],{"class":95},"();\n",[85,456,457,459,461,464],{"class":87,"line":174},[85,458,446],{"class":91},[85,460,449],{"class":95},[85,462,463],{"class":119},"ready",[85,465,454],{"class":95},[247,467,469],{"id":468},"middleware",[71,470,468],{},[67,472,473,474,476,477,479],{},"An array of ",[358,475,468],{"href":23}," handlers to run before the main ",[71,478,73],{}," handler.",[76,481,483],{"className":78,"code":482,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  middleware: [\n    (request, next) => {\n      console.log(`[${request.method}] ${request.url}`);\n      return next();\n    },\n  ],\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,484,485,497,501,507,512,535,571,581,586,591,609],{"__ignoreMap":81},[85,486,487,489,491,493,495],{"class":87,"line":88},[85,488,92],{"class":91},[85,490,96],{"class":95},[85,492,99],{"class":91},[85,494,103],{"class":102},[85,496,106],{"class":95},[85,498,499],{"class":87,"line":109},[85,500,113],{"emptyLinePlaceholder":112},[85,502,503,505],{"class":87,"line":116},[85,504,120],{"class":119},[85,506,123],{"class":95},[85,508,509],{"class":87,"line":126},[85,510,511],{"class":95},"  middleware: [\n",[85,513,514,517,521,524,527,530,532],{"class":87,"line":133},[85,515,516],{"class":95},"    (",[85,518,520],{"class":519},"sQHwn","request",[85,522,523],{"class":95},", ",[85,525,526],{"class":519},"next",[85,528,529],{"class":95},") ",[85,531,206],{"class":91},[85,533,534],{"class":95}," {\n",[85,536,537,540,543,545,548,550,552,555,558,560,562,565,568],{"class":87,"line":146},[85,538,539],{"class":95},"      console.",[85,541,542],{"class":119},"log",[85,544,215],{"class":95},[85,546,547],{"class":102},"`[${",[85,549,520],{"class":95},[85,551,264],{"class":102},[85,553,554],{"class":95},"method",[85,556,557],{"class":102},"}] ${",[85,559,520],{"class":95},[85,561,264],{"class":102},[85,563,564],{"class":95},"url",[85,566,567],{"class":102},"}`",[85,569,570],{"class":95},");\n",[85,572,573,576,579],{"class":87,"line":157},[85,574,575],{"class":91},"      return",[85,577,578],{"class":119}," next",[85,580,454],{"class":95},[85,582,583],{"class":87,"line":162},[85,584,585],{"class":95},"    },\n",[85,587,588],{"class":87,"line":168},[85,589,590],{"class":95},"  ],\n",[85,592,593,595,597,599,601,603,605,607],{"class":87,"line":174},[85,594,200],{"class":119},[85,596,203],{"class":95},[85,598,206],{"class":91},[85,600,209],{"class":91},[85,602,212],{"class":119},[85,604,215],{"class":95},[85,606,218],{"class":102},[85,608,221],{"class":95},[85,610,611],{"class":87,"line":180},[85,612,227],{"class":95},[614,615],"read-more",{"to":23,"title":22},[247,617,619],{"id":618},"plugins",[71,620,618],{},[67,622,473,623,625,626,629],{},[358,624,618],{"href":23}," to extend the server. A plugin is a ",[297,627,628],{},"synchronous"," function that receives the server instance and can register middleware, hook into the lifecycle, or augment requests.",[76,631,633],{"className":78,"code":632,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nconst myPlugin = (server) => {\n  server.options.middleware.push((request, next) => next());\n};\n\nserve({\n  plugins: [myPlugin],\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,634,635,647,651,672,698,703,707,713,718,736],{"__ignoreMap":81},[85,636,637,639,641,643,645],{"class":87,"line":88},[85,638,92],{"class":91},[85,640,96],{"class":95},[85,642,99],{"class":91},[85,644,103],{"class":102},[85,646,106],{"class":95},[85,648,649],{"class":87,"line":109},[85,650,113],{"emptyLinePlaceholder":112},[85,652,653,655,658,660,663,666,668,670],{"class":87,"line":116},[85,654,390],{"class":91},[85,656,657],{"class":119}," myPlugin",[85,659,396],{"class":91},[85,661,662],{"class":95}," (",[85,664,665],{"class":519},"server",[85,667,529],{"class":95},[85,669,206],{"class":91},[85,671,534],{"class":95},[85,673,674,677,680,683,685,687,689,691,693,695],{"class":87,"line":126},[85,675,676],{"class":95},"  server.options.middleware.",[85,678,679],{"class":119},"push",[85,681,682],{"class":95},"((",[85,684,520],{"class":519},[85,686,523],{"class":95},[85,688,526],{"class":519},[85,690,529],{"class":95},[85,692,206],{"class":91},[85,694,578],{"class":119},[85,696,697],{"class":95},"());\n",[85,699,700],{"class":87,"line":133},[85,701,702],{"class":95},"};\n",[85,704,705],{"class":87,"line":146},[85,706,113],{"emptyLinePlaceholder":112},[85,708,709,711],{"class":87,"line":157},[85,710,120],{"class":119},[85,712,123],{"class":95},[85,714,715],{"class":87,"line":162},[85,716,717],{"class":95},"  plugins: [myPlugin],\n",[85,719,720,722,724,726,728,730,732,734],{"class":87,"line":168},[85,721,200],{"class":119},[85,723,203],{"class":95},[85,725,206],{"class":91},[85,727,209],{"class":91},[85,729,212],{"class":119},[85,731,215],{"class":95},[85,733,218],{"class":102},[85,735,221],{"class":95},[85,737,738],{"class":87,"line":174},[85,739,227],{"class":95},[320,741,742],{},[67,743,744,745,748],{},"\nPlugins are sync-only (they return ",[71,746,747],{},"void","). All plugin-registered middleware is therefore in place before the first request is handled.",[247,750,752],{"id":751},"protocol",[71,753,751],{},[67,755,756],{},"The protocol to use for the server.",[67,758,759,760,763,764,264],{},"Possible values are ",[71,761,762],{},"http"," or ",[71,765,766],{},"https",[67,768,769,770,772,773,775,776,778,779,782,783,786],{},"If ",[71,771,751],{}," is not set, Server will use ",[71,774,762],{}," as the default protocol or ",[71,777,766],{}," if both ",[71,780,781],{},"tls.cert"," and ",[71,784,785],{},"tls.key"," options are provided.",[247,788,790],{"id":789},"tls",[71,791,789],{},[67,793,794],{},"TLS server options.",[67,796,797],{},[297,798,799],{},"Example:",[76,801,803],{"className":78,"code":802,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  tls: { cert: \"./server.crt\", key: \"./server.key\" },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,804,805,817,821,827,844,862],{"__ignoreMap":81},[85,806,807,809,811,813,815],{"class":87,"line":88},[85,808,92],{"class":91},[85,810,96],{"class":95},[85,812,99],{"class":91},[85,814,103],{"class":102},[85,816,106],{"class":95},[85,818,819],{"class":87,"line":109},[85,820,113],{"emptyLinePlaceholder":112},[85,822,823,825],{"class":87,"line":116},[85,824,120],{"class":119},[85,826,123],{"class":95},[85,828,829,832,835,838,841],{"class":87,"line":126},[85,830,831],{"class":95},"  tls: { cert: ",[85,833,834],{"class":102},"\"./server.crt\"",[85,836,837],{"class":95},", key: ",[85,839,840],{"class":102},"\"./server.key\"",[85,842,843],{"class":95}," },\n",[85,845,846,848,850,852,854,856,858,860],{"class":87,"line":133},[85,847,200],{"class":119},[85,849,203],{"class":95},[85,851,206],{"class":91},[85,853,209],{"class":91},[85,855,212],{"class":119},[85,857,215],{"class":95},[85,859,218],{"class":102},[85,861,221],{"class":95},[85,863,864],{"class":87,"line":146},[85,865,227],{"class":95},[67,867,868],{},[297,869,870],{},"Options:",[232,872,873,879,885],{},[235,874,875,878],{},[71,876,877],{},"cert",": Path or inline content for the certificate in PEM format (required).",[235,880,881,884],{},[71,882,883],{},"key",": Path or inline content for the private key in PEM format (required).",[235,886,887,890],{},[71,888,889],{},"passphrase",": Passphrase for the private key (optional).",[266,892,893],{},[67,894,895,896,782,898,900,901,264],{},"\nYou can pass inline ",[71,897,877],{},[71,899,883],{}," values in PEM format starting with ",[71,902,903],{},"-----BEGIN ",[67,905,906,907,264],{},"Client certificates (mutual TLS) are available through the ",[358,908,910,913],{"href":909},"/guide/tls#mutual-tls-mtls",[71,911,912],{},"mtlsPlugin()"," plugin",[614,915],{"to":33,"title":916},"TLS & mutual TLS",[247,918,920],{"id":919},"error",[71,921,919],{},[67,923,924,925,927,928,931],{},"Runtime agnostic error handler. It runs whenever the ",[71,926,73],{}," handler (or any middleware) throws or rejects, and returns the ",[71,929,930],{},"Response"," to send instead.",[320,933,934,936],{},[67,935],{},[67,937,938],{},"This handler will also take over the built-in error handlers of Deno and Bun.",[67,940,941],{},[297,942,799],{},[76,944,946],{"className":78,"code":945,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  fetch: () => new Response(\"👋 Hello there!\"),\n  error(error) {\n    return new Response(`\u003Cpre>${error}\\n${error.stack}\u003C/pre>`, {\n      headers: { \"Content-Type\": \"text/html\" },\n    });\n  },\n});\n",[71,947,948,960,964,970,988,1000,1038,1054,1059,1064],{"__ignoreMap":81},[85,949,950,952,954,956,958],{"class":87,"line":88},[85,951,92],{"class":91},[85,953,96],{"class":95},[85,955,99],{"class":91},[85,957,103],{"class":102},[85,959,106],{"class":95},[85,961,962],{"class":87,"line":109},[85,963,113],{"emptyLinePlaceholder":112},[85,965,966,968],{"class":87,"line":116},[85,967,120],{"class":119},[85,969,123],{"class":95},[85,971,972,974,976,978,980,982,984,986],{"class":87,"line":126},[85,973,200],{"class":119},[85,975,203],{"class":95},[85,977,206],{"class":91},[85,979,209],{"class":91},[85,981,212],{"class":119},[85,983,215],{"class":95},[85,985,218],{"class":102},[85,987,221],{"class":95},[85,989,990,993,995,997],{"class":87,"line":133},[85,991,992],{"class":119},"  error",[85,994,215],{"class":95},[85,996,919],{"class":519},[85,998,999],{"class":95},") {\n",[85,1001,1002,1005,1007,1009,1011,1014,1016,1019,1022,1025,1027,1029,1032,1035],{"class":87,"line":146},[85,1003,1004],{"class":91},"    return",[85,1006,209],{"class":91},[85,1008,212],{"class":119},[85,1010,215],{"class":95},[85,1012,1013],{"class":102},"`\u003Cpre>${",[85,1015,919],{"class":95},[85,1017,1018],{"class":102},"}",[85,1020,1021],{"class":139},"\\n",[85,1023,1024],{"class":102},"${",[85,1026,919],{"class":95},[85,1028,264],{"class":102},[85,1030,1031],{"class":95},"stack",[85,1033,1034],{"class":102},"}\u003C/pre>`",[85,1036,1037],{"class":95},", {\n",[85,1039,1040,1043,1046,1049,1052],{"class":87,"line":157},[85,1041,1042],{"class":95},"      headers: { ",[85,1044,1045],{"class":102},"\"Content-Type\"",[85,1047,1048],{"class":95},": ",[85,1050,1051],{"class":102},"\"text/html\"",[85,1053,843],{"class":95},[85,1055,1056],{"class":87,"line":162},[85,1057,1058],{"class":95},"    });\n",[85,1060,1061],{"class":87,"line":168},[85,1062,1063],{"class":95},"  },\n",[85,1065,1066],{"class":87,"line":174},[85,1067,227],{"class":95},[247,1069,1071],{"id":1070},"maxrequestbodysize",[71,1072,1073],{},"maxRequestBodySize",[67,1075,1076,1077,1080,1081,1084],{},"Maximum allowed size ",[297,1078,1079],{},"in bytes"," for the request body. Defaults to ",[71,1082,1083],{},"undefined"," (no limit).",[67,1086,1087,1088,1091,1092,523,1095,782,1098,1101,1102,1107,1108,1111],{},"As the body is read, its accumulated length is tracked and, once it exceeds the limit, reading is aborted and rejects with a ",[71,1089,1090],{},"413","-style error. The error carries ",[71,1093,1094],{},"statusCode: 413",[71,1096,1097],{},"status: 413",[71,1099,1100],{},"code: \"ERR_BODY_TOO_LARGE\"",", so a handler (or ",[358,1103,1105],{"href":1104},"#error",[71,1106,919],{},") can map it to an HTTP ",[71,1109,1110],{},"413 Payload Too Large"," response.",[67,1113,1114,1115,1118,1119,1122,1123,1126,1127,1118,1130,1118,1133,1118,1136,1139],{},"The limit covers both buffered reads (",[71,1116,1117],{},"request.text()"," / ",[71,1120,1121],{},"request.json()",") and the streamed body (",[71,1124,1125],{},"request.body",", and therefore ",[71,1128,1129],{},"request.arrayBuffer()",[71,1131,1132],{},".blob()",[71,1134,1135],{},".bytes()",[71,1137,1138],{},".formData()",").",[67,1141,1142],{},[297,1143,799],{},[76,1145,1147],{"className":78,"code":1146,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  maxRequestBodySize: 1024 * 1024, // 1 MiB\n  fetch: async (request) => {\n    try {\n      return Response.json(await request.json());\n    } catch (error) {\n      if (error.code === \"ERR_BODY_TOO_LARGE\") {\n        return new Response(\"Payload Too Large\", { status: 413 });\n      }\n      throw error;\n    }\n  },\n});\n",[71,1148,1149,1161,1165,1171,1190,1209,1216,1237,1248,1264,1286,1291,1299,1304,1308],{"__ignoreMap":81},[85,1150,1151,1153,1155,1157,1159],{"class":87,"line":88},[85,1152,92],{"class":91},[85,1154,96],{"class":95},[85,1156,99],{"class":91},[85,1158,103],{"class":102},[85,1160,106],{"class":95},[85,1162,1163],{"class":87,"line":109},[85,1164,113],{"emptyLinePlaceholder":112},[85,1166,1167,1169],{"class":87,"line":116},[85,1168,120],{"class":119},[85,1170,123],{"class":95},[85,1172,1173,1176,1179,1182,1185,1187],{"class":87,"line":126},[85,1174,1175],{"class":95},"  maxRequestBodySize: ",[85,1177,1178],{"class":139},"1024",[85,1180,1181],{"class":91}," *",[85,1183,1184],{"class":139}," 1024",[85,1186,523],{"class":95},[85,1188,1189],{"class":129},"// 1 MiB\n",[85,1191,1192,1194,1196,1199,1201,1203,1205,1207],{"class":87,"line":133},[85,1193,200],{"class":119},[85,1195,1048],{"class":95},[85,1197,1198],{"class":91},"async",[85,1200,662],{"class":95},[85,1202,520],{"class":519},[85,1204,529],{"class":95},[85,1206,206],{"class":91},[85,1208,534],{"class":95},[85,1210,1211,1214],{"class":87,"line":146},[85,1212,1213],{"class":91},"    try",[85,1215,534],{"class":95},[85,1217,1218,1220,1223,1226,1228,1230,1233,1235],{"class":87,"line":157},[85,1219,575],{"class":91},[85,1221,1222],{"class":95}," Response.",[85,1224,1225],{"class":119},"json",[85,1227,215],{"class":95},[85,1229,446],{"class":91},[85,1231,1232],{"class":95}," request.",[85,1234,1225],{"class":119},[85,1236,697],{"class":95},[85,1238,1239,1242,1245],{"class":87,"line":162},[85,1240,1241],{"class":95},"    } ",[85,1243,1244],{"class":91},"catch",[85,1246,1247],{"class":95}," (error) {\n",[85,1249,1250,1253,1256,1259,1262],{"class":87,"line":168},[85,1251,1252],{"class":91},"      if",[85,1254,1255],{"class":95}," (error.code ",[85,1257,1258],{"class":91},"===",[85,1260,1261],{"class":102}," \"ERR_BODY_TOO_LARGE\"",[85,1263,999],{"class":95},[85,1265,1266,1269,1271,1273,1275,1278,1281,1283],{"class":87,"line":174},[85,1267,1268],{"class":91},"        return",[85,1270,209],{"class":91},[85,1272,212],{"class":119},[85,1274,215],{"class":95},[85,1276,1277],{"class":102},"\"Payload Too Large\"",[85,1279,1280],{"class":95},", { status: ",[85,1282,1090],{"class":139},[85,1284,1285],{"class":95}," });\n",[85,1287,1288],{"class":87,"line":180},[85,1289,1290],{"class":95},"      }\n",[85,1292,1293,1296],{"class":87,"line":186},[85,1294,1295],{"class":91},"      throw",[85,1297,1298],{"class":95}," error;\n",[85,1300,1301],{"class":87,"line":191},[85,1302,1303],{"class":95},"    }\n",[85,1305,1306],{"class":87,"line":197},[85,1307,1063],{"class":95},[85,1309,1310],{"class":87,"line":224},[85,1311,227],{"class":95},[320,1313,1314,1317],{},[67,1315,1316],{},"\nRuntime support:",[232,1318,1319,1325,1342],{},[235,1320,1321,1324],{},[297,1322,1323],{},"Node",": enforced by srvx (the request body stream is size-limited).",[235,1326,1327,1330,1331,1338,1339,1341],{},[297,1328,1329],{},"Bun",": forwarded to Bun's native ",[358,1332,1336],{"href":1333,"rel":1334},"https://bun.sh/docs/api/http",[1335],"nofollow",[71,1337,1073],{},", enforced by Bun (responds with ",[71,1340,1090],{}," before the handler runs).",[235,1343,1344,1347,1348,1351],{},[297,1345,1346],{},"Deno",": enforced by srvx (",[71,1349,1350],{},"Deno.serve"," has no native option).",[67,1353,1354,1355,1360],{},"The underlying helpers are also exported from ",[358,1356,1357],{"href":53},[71,1358,1359],{},"srvx/body-limit"," for enforcing your own (e.g. per-handler) limits with the same streaming semantics and error shape.",[247,1362,1364],{"id":1363},"trustproxy",[71,1365,1366],{},"trustProxy",[67,1368,1369,1370,1373,1374,523,1377,523,1380,1383,1384,1387,1388,782,1391,1394,1395,264],{},"Whether to trust ",[71,1371,1372],{},"X-Forwarded-*"," headers (",[71,1375,1376],{},"X-Forwarded-Proto",[71,1378,1379],{},"X-Forwarded-Host",[71,1381,1382],{},"X-Forwarded-For",", and the HTTP/2 ",[71,1385,1386],{},":scheme",") when deriving ",[71,1389,1390],{},"request.url",[71,1392,1393],{},"request.ip",". Defaults to ",[71,1396,1397],{},"false",[67,1399,1400,1401,523,1404,763,1406,1408,1409,1412],{},"Any client can send ",[71,1402,1403],{},"X-Forwarded-Proto: https",[71,1405,1379],{},[71,1407,1382],{},", so trusting them lets a request masquerade as ",[71,1410,1411],{},"https:",", forge its host, or spoof its client IP. Only enable this when a proxy you control sits in front.",[232,1414,1415,1424,1432,1445],{},[235,1416,1417,1419,1420,1423],{},[71,1418,1397],{}," (default): ignore the headers; use the real connection protocol, the on-the-wire ",[71,1421,1422],{},"Host"," header and the socket peer address.",[235,1425,1426,1428,1429,1431],{},[71,1427,351],{},": trust every hop (the leftmost ",[71,1430,1382],{}," entry is the client).",[235,1433,1434,1437,1438,763,1441,1444],{},[71,1435,1436],{},"\"loopback\"",": trust hops on a loopback address (",[71,1439,1440],{},"127.0.0.0/8",[71,1442,1443],{},"::1","), i.e. a proxy on the same host.",[235,1446,1447,1450],{},[71,1448,1449],{},"string[]",": trust hops whose address is in the allowlist.",[1452,1453,1455],"h4",{"id":1454},"hop-aware-resolution","Hop-aware resolution",[67,1457,1458,1459,1462,1463,1465,1466,1469,1470,1473,1474,1477],{},"Real proxies ",[297,1460,1461],{},"append"," to ",[71,1464,1372],{},", so the chain grows left-to-right (outermost client first, nearest proxy last). srvx resolves it ",[297,1467,1468],{},"hop-aware, right-to-left",", matching Express (",[71,1471,1472],{},"trust proxy","), nginx (",[71,1475,1476],{},"$proxy_add_x_forwarded_for",") and AWS ALB:",[232,1479,1480,1483,1492,1495],{},[235,1481,1482],{},"Starting from the immediate peer, each address in the trusted set is treated as a proxy you control.",[235,1484,1485],{},[297,1486,1487,1488,1491],{},"The client is the rightmost address ",[1489,1490,355],"em",{}," in the trusted set.",[235,1493,1494],{},"If every address in the chain is trusted, the leftmost entry is the client.",[235,1496,1497],{},"If the immediate peer is not trusted, the headers are ignored entirely.",[67,1499,1500,1501,1503,1504,1507,1508,1511,1512,1515,1516,1518],{},"This is why a spoofed prefix cannot poison ",[71,1502,1393],{},": with ",[71,1505,1506],{},"trustProxy: \"loopback\""," and a request carrying ",[71,1509,1510],{},"X-Forwarded-For: 9.9.9.9",", the trusted proxy appends the real client address, so the forged ",[71,1513,1514],{},"9.9.9.9"," is skipped rather than returned. The same model gates the forwarded protocol and host: only the value contributed by the trusted proxy is honored, so an attacker cannot poison ",[71,1517,1390],{}," (e.g. cache keys or password-reset links).",[67,1520,1521],{},[297,1522,799],{},[76,1524,1526],{"className":78,"code":1525,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  // Behind a reverse proxy you control (e.g. Nginx, a load balancer):\n  trustProxy: true,\n  fetch: (request) => new Response(new URL(request.url).protocol),\n});\n",[71,1527,1528,1540,1544,1550,1555,1564,1592],{"__ignoreMap":81},[85,1529,1530,1532,1534,1536,1538],{"class":87,"line":88},[85,1531,92],{"class":91},[85,1533,96],{"class":95},[85,1535,99],{"class":91},[85,1537,103],{"class":102},[85,1539,106],{"class":95},[85,1541,1542],{"class":87,"line":109},[85,1543,113],{"emptyLinePlaceholder":112},[85,1545,1546,1548],{"class":87,"line":116},[85,1547,120],{"class":119},[85,1549,123],{"class":95},[85,1551,1552],{"class":87,"line":126},[85,1553,1554],{"class":129},"  // Behind a reverse proxy you control (e.g. Nginx, a load balancer):\n",[85,1556,1557,1560,1562],{"class":87,"line":133},[85,1558,1559],{"class":95},"  trustProxy: ",[85,1561,351],{"class":139},[85,1563,143],{"class":95},[85,1565,1566,1568,1571,1573,1575,1577,1579,1581,1583,1586,1589],{"class":87,"line":146},[85,1567,200],{"class":119},[85,1569,1570],{"class":95},": (",[85,1572,520],{"class":519},[85,1574,529],{"class":95},[85,1576,206],{"class":91},[85,1578,209],{"class":91},[85,1580,212],{"class":119},[85,1582,215],{"class":95},[85,1584,1585],{"class":91},"new",[85,1587,1588],{"class":119}," URL",[85,1590,1591],{"class":95},"(request.url).protocol),\n",[85,1593,1594],{"class":87,"line":157},[85,1595,227],{"class":95},[320,1597,1598],{},[67,1599,1600],{},"\nApplies to the Node, AWS Lambda, Bun and Deno adapters.",[242,1602,1604],{"id":1603},"runtime-specific-options","Runtime Specific Options",[247,1606,1608],{"id":1607},"nodejs","Node.js",[67,1610,1611],{},[297,1612,799],{},[76,1614,1616],{"className":78,"code":1615,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  node: {\n    maxHeaderSize: 16384 * 2, // Double default\n    ipv6Only: true, // Disable dual-stack support\n    // http2: false // Disable http2 support (enabled by default in TLS mode)\n  },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,1617,1618,1630,1634,1640,1645,1663,1675,1683,1687,1705],{"__ignoreMap":81},[85,1619,1620,1622,1624,1626,1628],{"class":87,"line":88},[85,1621,92],{"class":91},[85,1623,96],{"class":95},[85,1625,99],{"class":91},[85,1627,103],{"class":102},[85,1629,106],{"class":95},[85,1631,1632],{"class":87,"line":109},[85,1633,113],{"emptyLinePlaceholder":112},[85,1635,1636,1638],{"class":87,"line":116},[85,1637,120],{"class":119},[85,1639,123],{"class":95},[85,1641,1642],{"class":87,"line":126},[85,1643,1644],{"class":95},"  node: {\n",[85,1646,1647,1650,1653,1655,1658,1660],{"class":87,"line":133},[85,1648,1649],{"class":95},"    maxHeaderSize: ",[85,1651,1652],{"class":139},"16384",[85,1654,1181],{"class":91},[85,1656,1657],{"class":139}," 2",[85,1659,523],{"class":95},[85,1661,1662],{"class":129},"// Double default\n",[85,1664,1665,1668,1670,1672],{"class":87,"line":146},[85,1666,1667],{"class":95},"    ipv6Only: ",[85,1669,351],{"class":139},[85,1671,523],{"class":95},[85,1673,1674],{"class":129},"// Disable dual-stack support\n",[85,1676,1677,1680],{"class":87,"line":157},[85,1678,1679],{"class":129},"    // http2: false",[85,1681,1682],{"class":129}," // Disable http2 support (enabled by default in TLS mode)\n",[85,1684,1685],{"class":87,"line":162},[85,1686,1063],{"class":95},[85,1688,1689,1691,1693,1695,1697,1699,1701,1703],{"class":87,"line":168},[85,1690,200],{"class":119},[85,1692,203],{"class":95},[85,1694,206],{"class":91},[85,1696,209],{"class":91},[85,1698,212],{"class":119},[85,1700,215],{"class":95},[85,1702,218],{"class":102},[85,1704,221],{"class":95},[85,1706,1707],{"class":87,"line":174},[85,1708,227],{"class":95},[614,1710,1711],{},[67,1712,1713,1714,782,1719,1724],{},"See Node.js documentation for ",[358,1715,1718],{"href":1716,"rel":1717},"https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener",[1335],"ServerOptions",[358,1720,1723],{"href":1721,"rel":1722},"https://nodejs.org/api/net.html#serverlistenoptions-callback",[1335],"ListenOptions"," for all available options.",[247,1726,1329],{"id":1727},"bun",[67,1729,1730],{},[297,1731,799],{},[76,1733,1735],{"className":78,"code":1734,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  bun: {\n    error(error) {\n      return new Response(`\u003Cpre>${error}\\n${error.stack}\u003C/pre>`, {\n        headers: { \"Content-Type\": \"text/html\" },\n      });\n    },\n  },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,1736,1737,1749,1753,1759,1764,1775,1805,1818,1823,1827,1831,1849],{"__ignoreMap":81},[85,1738,1739,1741,1743,1745,1747],{"class":87,"line":88},[85,1740,92],{"class":91},[85,1742,96],{"class":95},[85,1744,99],{"class":91},[85,1746,103],{"class":102},[85,1748,106],{"class":95},[85,1750,1751],{"class":87,"line":109},[85,1752,113],{"emptyLinePlaceholder":112},[85,1754,1755,1757],{"class":87,"line":116},[85,1756,120],{"class":119},[85,1758,123],{"class":95},[85,1760,1761],{"class":87,"line":126},[85,1762,1763],{"class":95},"  bun: {\n",[85,1765,1766,1769,1771,1773],{"class":87,"line":133},[85,1767,1768],{"class":119},"    error",[85,1770,215],{"class":95},[85,1772,919],{"class":519},[85,1774,999],{"class":95},[85,1776,1777,1779,1781,1783,1785,1787,1789,1791,1793,1795,1797,1799,1801,1803],{"class":87,"line":146},[85,1778,575],{"class":91},[85,1780,209],{"class":91},[85,1782,212],{"class":119},[85,1784,215],{"class":95},[85,1786,1013],{"class":102},[85,1788,919],{"class":95},[85,1790,1018],{"class":102},[85,1792,1021],{"class":139},[85,1794,1024],{"class":102},[85,1796,919],{"class":95},[85,1798,264],{"class":102},[85,1800,1031],{"class":95},[85,1802,1034],{"class":102},[85,1804,1037],{"class":95},[85,1806,1807,1810,1812,1814,1816],{"class":87,"line":157},[85,1808,1809],{"class":95},"        headers: { ",[85,1811,1045],{"class":102},[85,1813,1048],{"class":95},[85,1815,1051],{"class":102},[85,1817,843],{"class":95},[85,1819,1820],{"class":87,"line":162},[85,1821,1822],{"class":95},"      });\n",[85,1824,1825],{"class":87,"line":168},[85,1826,585],{"class":95},[85,1828,1829],{"class":87,"line":174},[85,1830,1063],{"class":95},[85,1832,1833,1835,1837,1839,1841,1843,1845,1847],{"class":87,"line":180},[85,1834,200],{"class":119},[85,1836,203],{"class":95},[85,1838,206],{"class":91},[85,1840,209],{"class":91},[85,1842,212],{"class":119},[85,1844,215],{"class":95},[85,1846,218],{"class":102},[85,1848,221],{"class":95},[85,1850,1851],{"class":87,"line":186},[85,1852,227],{"class":95},[614,1854,1855],{"to":1333},[67,1856,1857],{},"See Bun HTTP documentation for all available options.",[247,1859,1346],{"id":1860},"deno",[67,1862,1863],{},[297,1864,799],{},[76,1866,1868],{"className":78,"code":1867,"language":80,"meta":81,"style":81},"import { serve } from \"srvx\";\n\nserve({\n  deno: {\n    onError(error) {\n      return new Response(`\u003Cpre>${error}\\n${error.stack}\u003C/pre>`, {\n        headers: { \"Content-Type\": \"text/html\" },\n      });\n    },\n  },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,1869,1870,1882,1886,1892,1897,1908,1938,1950,1954,1958,1962,1980],{"__ignoreMap":81},[85,1871,1872,1874,1876,1878,1880],{"class":87,"line":88},[85,1873,92],{"class":91},[85,1875,96],{"class":95},[85,1877,99],{"class":91},[85,1879,103],{"class":102},[85,1881,106],{"class":95},[85,1883,1884],{"class":87,"line":109},[85,1885,113],{"emptyLinePlaceholder":112},[85,1887,1888,1890],{"class":87,"line":116},[85,1889,120],{"class":119},[85,1891,123],{"class":95},[85,1893,1894],{"class":87,"line":126},[85,1895,1896],{"class":95},"  deno: {\n",[85,1898,1899,1902,1904,1906],{"class":87,"line":133},[85,1900,1901],{"class":119},"    onError",[85,1903,215],{"class":95},[85,1905,919],{"class":519},[85,1907,999],{"class":95},[85,1909,1910,1912,1914,1916,1918,1920,1922,1924,1926,1928,1930,1932,1934,1936],{"class":87,"line":146},[85,1911,575],{"class":91},[85,1913,209],{"class":91},[85,1915,212],{"class":119},[85,1917,215],{"class":95},[85,1919,1013],{"class":102},[85,1921,919],{"class":95},[85,1923,1018],{"class":102},[85,1925,1021],{"class":139},[85,1927,1024],{"class":102},[85,1929,919],{"class":95},[85,1931,264],{"class":102},[85,1933,1031],{"class":95},[85,1935,1034],{"class":102},[85,1937,1037],{"class":95},[85,1939,1940,1942,1944,1946,1948],{"class":87,"line":157},[85,1941,1809],{"class":95},[85,1943,1045],{"class":102},[85,1945,1048],{"class":95},[85,1947,1051],{"class":102},[85,1949,843],{"class":95},[85,1951,1952],{"class":87,"line":162},[85,1953,1822],{"class":95},[85,1955,1956],{"class":87,"line":168},[85,1957,585],{"class":95},[85,1959,1960],{"class":87,"line":174},[85,1961,1063],{"class":95},[85,1963,1964,1966,1968,1970,1972,1974,1976,1978],{"class":87,"line":180},[85,1965,200],{"class":119},[85,1967,203],{"class":95},[85,1969,206],{"class":91},[85,1971,209],{"class":91},[85,1973,212],{"class":119},[85,1975,215],{"class":95},[85,1977,218],{"class":102},[85,1979,221],{"class":95},[85,1981,1982],{"class":87,"line":186},[85,1983,227],{"class":95},[614,1985,1987],{"to":1986},"https://docs.deno.com/api/deno/~/Deno.ServeOptions",[67,1988,1989],{},"See Deno serve documentation for all available options.",[247,1991,1993],{"id":1992},"service-worker","Service Worker",[67,1995,1996,1997,1139],{},"Options for the service worker adapter (",[71,1998,1999],{},"srvx/service-worker",[76,2001,2003],{"className":78,"code":2002,"language":80,"meta":81,"style":81},"import { serve } from \"srvx/service-worker\";\n\nserve({\n  serviceWorker: {\n    url: \"/sw.js\", // path to the service worker file to register\n    scope: \"/\", // service worker scope\n  },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[71,2004,2005,2018,2022,2028,2033,2046,2059,2063,2081],{"__ignoreMap":81},[85,2006,2007,2009,2011,2013,2016],{"class":87,"line":88},[85,2008,92],{"class":91},[85,2010,96],{"class":95},[85,2012,99],{"class":91},[85,2014,2015],{"class":102}," \"srvx/service-worker\"",[85,2017,106],{"class":95},[85,2019,2020],{"class":87,"line":109},[85,2021,113],{"emptyLinePlaceholder":112},[85,2023,2024,2026],{"class":87,"line":116},[85,2025,120],{"class":119},[85,2027,123],{"class":95},[85,2029,2030],{"class":87,"line":126},[85,2031,2032],{"class":95},"  serviceWorker: {\n",[85,2034,2035,2038,2041,2043],{"class":87,"line":133},[85,2036,2037],{"class":95},"    url: ",[85,2039,2040],{"class":102},"\"/sw.js\"",[85,2042,523],{"class":95},[85,2044,2045],{"class":129},"// path to the service worker file to register\n",[85,2047,2048,2051,2054,2056],{"class":87,"line":146},[85,2049,2050],{"class":95},"    scope: ",[85,2052,2053],{"class":102},"\"/\"",[85,2055,523],{"class":95},[85,2057,2058],{"class":129},"// service worker scope\n",[85,2060,2061],{"class":87,"line":157},[85,2062,1063],{"class":95},[85,2064,2065,2067,2069,2071,2073,2075,2077,2079],{"class":87,"line":162},[85,2066,200],{"class":119},[85,2068,203],{"class":95},[85,2070,206],{"class":91},[85,2072,209],{"class":91},[85,2074,212],{"class":119},[85,2076,215],{"class":95},[85,2078,218],{"class":102},[85,2080,221],{"class":95},[85,2082,2083],{"class":87,"line":168},[85,2084,227],{"class":95},[232,2086,2087,2092],{},[235,2088,2089,2091],{},[71,2090,564],{},": The path to the service worker file to be registered.",[235,2093,2094,2097],{},[71,2095,2096],{},"scope",": The scope of the service worker.",[242,2099,2101],{"id":2100},"per-runtime-support","Per-runtime Support",[67,2103,2104],{},"srvx aims for identical behavior across runtimes, but a few options depend on capabilities the underlying runtime does not expose. The table below lists the intentional differences.",[2106,2107,2108,2121],"table",{},[2109,2110,2111],"thead",{},[2112,2113,2114,2118],"tr",{},[2115,2116,2117],"th",{},"Option / feature",[2115,2119,2120],{},"Behavior",[2122,2123,2124,2145,2158,2174,2183,2193,2215],"tbody",{},[2112,2125,2126,2133],{},[2127,2128,2129,2132],"td",{},[71,2130,2131],{},"close(true)"," (force close)",[2127,2134,2135,2136,2138,2139,2141,2142,264],{},"Honored on Node and Bun. On ",[297,2137,1346],{}," the force argument is currently ignored — ",[71,2140,2131],{}," behaves like a graceful ",[71,2143,2144],{},"close()",[2112,2146,2147,2151],{},[2127,2148,2149],{},[71,2150,1366],{},[2127,2152,2153,2154,2157],{},"Applies to the ",[297,2155,2156],{},"Node, AWS Lambda, Bun and Deno"," adapters only. Ignored on Cloudflare, Bunny and the generic/service-worker adapters.",[2112,2159,2160,2164],{},[2127,2161,2162],{},[71,2163,1073],{},[2127,2165,2166,2167,2169,2170,2173],{},"Node/Deno enforced by srvx (unlimited by default). ",[297,2168,1329],{}," forwards it to Bun's native option, which has its own ",[297,2171,2172],{},"128 MiB"," default even when unset. Dropped (not applied) when running under the CLI loader on any runtime.",[2112,2175,2176,2180],{},[2127,2177,2178],{},[71,2179,343],{},[2127,2181,2182],{},"Meaningless on module-worker runtimes (Cloudflare module syntax, Bunny) — there is no listening step to defer.",[2112,2184,2185,2190],{},[2127,2186,2187],{},[71,2188,2189],{},"gracefulShutdown",[2127,2191,2192],{},"Supported on Node, Deno and Bun. No-op on Cloudflare, Bunny and service-worker runtimes.",[2112,2194,2195,2202],{},[2127,2196,2197,2198,2201],{},"Cloudflare ",[71,2199,2200],{},"env"," bindings",[2127,2203,2204,2207,2208,2211,2212,2214],{},[71,2205,2206],{},"request.runtime.cloudflare.env"," is only populated in ",[297,2209,2210],{},"module-worker syntax",". In service-worker syntax (the global ",[71,2213,73],{}," listener) bindings are unavailable.",[2112,2216,2217,2225],{},[2127,2218,2219],{},[297,2220,2221,2224],{},[71,2222,2223],{},"upgrade"," / WebSocket",[2127,2226,2227,2228,2230,2231,2233,2234,2239],{},"srvx does ",[297,2229,355],{}," handle HTTP ",[71,2232,2223],{}," requests by default. Use ",[358,2235,2238],{"href":2236,"rel":2237},"https://crossws.h3.dev/guide",[1335],"crossws"," for WebSocket support.",[2241,2242,2243],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}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 .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}",{"title":81,"searchDepth":109,"depth":109,"links":2245},[2246,2260,2266],{"id":244,"depth":109,"text":245,"children":2247},[2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259],{"id":249,"depth":116,"text":249},{"id":277,"depth":116,"text":277},{"id":312,"depth":116,"text":315},{"id":331,"depth":116,"text":331},{"id":343,"depth":116,"text":343},{"id":468,"depth":116,"text":468},{"id":618,"depth":116,"text":618},{"id":751,"depth":116,"text":751},{"id":789,"depth":116,"text":789},{"id":919,"depth":116,"text":919},{"id":1070,"depth":116,"text":1073},{"id":1363,"depth":116,"text":1366},{"id":1603,"depth":109,"text":1604,"children":2261},[2262,2263,2264,2265],{"id":1607,"depth":116,"text":1608},{"id":1727,"depth":116,"text":1329},{"id":1860,"depth":116,"text":1346},{"id":1992,"depth":116,"text":1993},{"id":2100,"depth":109,"text":2101},"Provide additional options to customize listening server.","md",{"icon":30},{"icon":30},{"title":27,"description":2267},"iV8y9i53dpzyX1-BVzmGqhMItAfWkU79OwQxd8uUVLE",[2274,2276],{"title":22,"path":23,"stem":24,"description":2275,"icon":25,"children":-1},"Plugins and middleware allow adding reusable server extensions.",{"title":32,"path":33,"stem":34,"description":2277,"icon":35,"children":-1},"Serve over HTTPS and, optionally, require a client certificate (mutual TLS).",1785329752785]