[{"data":1,"prerenderedAt":1355},["ShallowReactive",2],{"navigation":3,"-guide-options":51,"-guide-options-surround":1350},[4],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Getting Started","/guide","1.guide/1.index",[9,11,16,21,26,31,36,41,46],{"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/2.handler","i-fluent:target-24-regular",{"title":17,"path":18,"stem":19,"icon":20},"Server Instance","/guide/server","1.guide/3.server","radix-icons:component-instance",{"title":22,"path":23,"stem":24,"icon":25},"Middleware","/guide/middleware","1.guide/4.middleware","clarity:plugin-line",{"title":27,"path":28,"stem":29,"icon":30},"Server Options","/guide/options","1.guide/5.options","ri:settings-3-line",{"title":32,"path":33,"stem":34,"icon":35},"Bundler Usage","/guide/bundler","1.guide/6.bundler","clarity:bundle-line",{"title":37,"path":38,"stem":39,"icon":40},"Node.js Support","/guide/node","1.guide/7.node","akar-icons:node-fill",{"title":42,"path":43,"stem":44,"icon":45},"AWS Lambda","/guide/aws-lambda","1.guide/8.aws-lambda","clarity:cloud-traffic-line",{"title":47,"path":48,"stem":49,"icon":50},"Using CLI","/guide/cli","1.guide/9.cli","garden:terminal-cli-stroke-12",{"id":52,"title":27,"body":53,"description":1344,"extension":1345,"meta":1346,"navigation":1347,"path":28,"seo":1348,"stem":29,"__hash__":1349},"content/1.guide/5.options.md",{"type":54,"value":55,"toc":1327,"icon":30},"minimark",[56,65,218,221,231,236,242,245,255,265,270,273,281,290,296,299,309,314,321,326,329,339,359,364,367,372,438,443,463,476,491,497,500,507,511,638,644,655,684,712,716,891,931,935,939,943,1040,1057,1060,1064,1186,1191,1194,1198,1317,1323],[57,58,59,60,64],"p",{},"When starting a new server, in addition to main ",[61,62,63],"code",{},"fetch"," handler, you can provide additional options to customize listening server.",[66,67,72],"pre",{"className":68,"code":69,"language":70,"meta":71,"style":71},"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","",[61,73,74,97,104,114,121,134,145,150,156,162,168,174,179,185,212],{"__ignoreMap":71},[75,76,79,83,87,90,94],"span",{"class":77,"line":78},"line",1,[75,80,82],{"class":81},"so5gQ","import",[75,84,86],{"class":85},"slsVL"," { serve } ",[75,88,89],{"class":81},"from",[75,91,93],{"class":92},"sfrk1"," \"srvx\"",[75,95,96],{"class":85},";\n",[75,98,100],{"class":77,"line":99},2,[75,101,103],{"emptyLinePlaceholder":102},true,"\n",[75,105,107,111],{"class":77,"line":106},3,[75,108,110],{"class":109},"shcOC","serve",[75,112,113],{"class":85},"({\n",[75,115,117],{"class":77,"line":116},4,[75,118,120],{"class":119},"sCsY4","  // Generic options\n",[75,122,124,127,131],{"class":77,"line":123},5,[75,125,126],{"class":85},"  port: ",[75,128,130],{"class":129},"suiK_","3000",[75,132,133],{"class":85},",\n",[75,135,137,140,143],{"class":77,"line":136},6,[75,138,139],{"class":85},"  hostname: ",[75,141,142],{"class":92},"\"localhost\"",[75,144,133],{"class":85},[75,146,148],{"class":77,"line":147},7,[75,149,103],{"emptyLinePlaceholder":102},[75,151,153],{"class":77,"line":152},8,[75,154,155],{"class":119},"  // Runtime specific options\n",[75,157,159],{"class":77,"line":158},9,[75,160,161],{"class":85},"  node: {},\n",[75,163,165],{"class":77,"line":164},10,[75,166,167],{"class":85},"  bun: {},\n",[75,169,171],{"class":77,"line":170},11,[75,172,173],{"class":85},"  deno: {},\n",[75,175,177],{"class":77,"line":176},12,[75,178,103],{"emptyLinePlaceholder":102},[75,180,182],{"class":77,"line":181},13,[75,183,184],{"class":119},"  // Main server handler\n",[75,186,188,191,194,197,200,203,206,209],{"class":77,"line":187},14,[75,189,190],{"class":109},"  fetch",[75,192,193],{"class":85},": () ",[75,195,196],{"class":81},"=>",[75,198,199],{"class":81}," new",[75,201,202],{"class":109}," Response",[75,204,205],{"class":85},"(",[75,207,208],{"class":92},"\"👋 Hello there!\"",[75,210,211],{"class":85},"),\n",[75,213,215],{"class":77,"line":214},15,[75,216,217],{"class":85},"});\n",[57,219,220],{},"There are two kind of options:",[222,223,224,228],"ul",{},[225,226,227],"li",{},"Generic options: Top level options are intended to have exactly same functionality regardless of runtime",[225,229,230],{},"Runtime specific: Allow customizing more runtime specific options",[232,233,235],"h2",{"id":234},"generic-options","Generic Options",[237,238,240],"h3",{"id":239},"port",[61,241,239],{},[57,243,244],{},"The port server should be listening to.",[57,246,247,248,251,252,254],{},"Default is value of ",[61,249,250],{},"PORT"," environment variable or ",[61,253,130],{},".",[256,257,258],"tip",{},[57,259,260,261,264],{},"\nYou can set the port to ",[61,262,263],{},"0"," to use a random port.",[237,266,268],{"id":267},"hostname",[61,269,267],{},[57,271,272],{},"The hostname (IP or resolvable host) server listener should bound to.",[57,274,275,276,280],{},"When not provided, server will ",[277,278,279],"strong",{},"listen to all network interfaces"," by default.",[282,283,284],"important",{},[57,285,286,287,254],{},"\nIf you are running a server that should not be exposed to the network, use ",[61,288,289],{},"localhost",[237,291,293],{"id":292},"reuseport",[61,294,295],{},"reusePort",[57,297,298],{},"Enabling this option allows multiple processes to bind to the same port, which is useful for load balancing.",[300,301,302],"note",{},[57,303,304,305,308],{},"\nDespite Node.js built-in behavior that has ",[61,306,307],{},"exclusive"," flag enabled by default, srvx uses non-exclusive mode for consistency.",[237,310,312],{"id":311},"silent",[61,313,311],{},[57,315,316,317,320],{},"If enabled, no server listening message will be printed (enabled by default when ",[61,318,319],{},"TEST"," environment variable is set).",[237,322,324],{"id":323},"protocol",[61,325,323],{},[57,327,328],{},"The protocol to use for the server.",[57,330,331,332,335,336,254],{},"Possible values are ",[61,333,334],{},"http"," or ",[61,337,338],{},"https",[57,340,341,342,344,345,347,348,350,351,354,355,358],{},"If ",[61,343,323],{}," is not set, Server will use ",[61,346,334],{}," as the default protocol or ",[61,349,338],{}," if both ",[61,352,353],{},"tls.cert"," and ",[61,356,357],{},"tls.key"," options are provided.",[237,360,362],{"id":361},"tls",[61,363,361],{},[57,365,366],{},"TLS server options.",[57,368,369],{},[277,370,371],{},"Example:",[66,373,375],{"className":68,"code":374,"language":70,"meta":71,"style":71},"import { serve } from \"srvx\";\n\nserve({\n  tls: { cert: \"./server.crt\", key: \"./server.key\" },\n  fetch: () => new Response(\"👋 Hello there!\"),\n});\n",[61,376,377,389,393,399,416,434],{"__ignoreMap":71},[75,378,379,381,383,385,387],{"class":77,"line":78},[75,380,82],{"class":81},[75,382,86],{"class":85},[75,384,89],{"class":81},[75,386,93],{"class":92},[75,388,96],{"class":85},[75,390,391],{"class":77,"line":99},[75,392,103],{"emptyLinePlaceholder":102},[75,394,395,397],{"class":77,"line":106},[75,396,110],{"class":109},[75,398,113],{"class":85},[75,400,401,404,407,410,413],{"class":77,"line":116},[75,402,403],{"class":85},"  tls: { cert: ",[75,405,406],{"class":92},"\"./server.crt\"",[75,408,409],{"class":85},", key: ",[75,411,412],{"class":92},"\"./server.key\"",[75,414,415],{"class":85}," },\n",[75,417,418,420,422,424,426,428,430,432],{"class":77,"line":123},[75,419,190],{"class":109},[75,421,193],{"class":85},[75,423,196],{"class":81},[75,425,199],{"class":81},[75,427,202],{"class":109},[75,429,205],{"class":85},[75,431,208],{"class":92},[75,433,211],{"class":85},[75,435,436],{"class":77,"line":136},[75,437,217],{"class":85},[57,439,440],{},[277,441,442],{},"Options:",[222,444,445,451,457],{},[225,446,447,450],{},[61,448,449],{},"cert",": Path or inline content for the certificate in PEM format (required).",[225,452,453,456],{},[61,454,455],{},"key",": Path or inline content for the private key in PEM format (required).",[225,458,459,462],{},[61,460,461],{},"passphrase",": Passphrase for the private key (optional).",[256,464,465],{},[57,466,467,468,354,470,472,473,254],{},"\nYou can pass inline ",[61,469,449],{},[61,471,455],{}," values in PEM format starting with ",[61,474,475],{},"-----BEGIN ",[282,477,478,480],{},[57,479],{},[222,481,482,485,488],{},[225,483,484],{},"Always keep your SSL private keys secure and never commit them to version control",[225,486,487],{},"Use environment variables or secure secret management for production deployments",[225,489,490],{},"Consider using automatic certificate management (e.g., Let's Encrypt) for production",[237,492,494],{"id":493},"onerror",[61,495,496],{},"onError",[57,498,499],{},"Runtime agnostic error handler.",[300,501,502,504],{},[57,503],{},[57,505,506],{},"This handler will take over the built-in error handlers of Deno and Bun.",[57,508,509],{},[277,510,371],{},[66,512,514],{"className":68,"code":513,"language":70,"meta":71,"style":71},"import { serve } from \"srvx\";\n\nserve({\n  fetch: () => new Response(\"👋 Hello there!\"),\n  onError(error) {\n    return new Response(`\u003Cpre>${error}\\n${error.stack}\u003C/pre>`, {\n      headers: { \"Content-Type\": \"text/html\" },\n    });\n  },\n});\n",[61,515,516,528,532,538,556,570,608,624,629,634],{"__ignoreMap":71},[75,517,518,520,522,524,526],{"class":77,"line":78},[75,519,82],{"class":81},[75,521,86],{"class":85},[75,523,89],{"class":81},[75,525,93],{"class":92},[75,527,96],{"class":85},[75,529,530],{"class":77,"line":99},[75,531,103],{"emptyLinePlaceholder":102},[75,533,534,536],{"class":77,"line":106},[75,535,110],{"class":109},[75,537,113],{"class":85},[75,539,540,542,544,546,548,550,552,554],{"class":77,"line":116},[75,541,190],{"class":109},[75,543,193],{"class":85},[75,545,196],{"class":81},[75,547,199],{"class":81},[75,549,202],{"class":109},[75,551,205],{"class":85},[75,553,208],{"class":92},[75,555,211],{"class":85},[75,557,558,561,563,567],{"class":77,"line":123},[75,559,560],{"class":109},"  onError",[75,562,205],{"class":85},[75,564,566],{"class":565},"sQHwn","error",[75,568,569],{"class":85},") {\n",[75,571,572,575,577,579,581,584,586,589,592,595,597,599,602,605],{"class":77,"line":136},[75,573,574],{"class":81},"    return",[75,576,199],{"class":81},[75,578,202],{"class":109},[75,580,205],{"class":85},[75,582,583],{"class":92},"`\u003Cpre>${",[75,585,566],{"class":85},[75,587,588],{"class":92},"}",[75,590,591],{"class":129},"\\n",[75,593,594],{"class":92},"${",[75,596,566],{"class":85},[75,598,254],{"class":92},[75,600,601],{"class":85},"stack",[75,603,604],{"class":92},"}\u003C/pre>`",[75,606,607],{"class":85},", {\n",[75,609,610,613,616,619,622],{"class":77,"line":147},[75,611,612],{"class":85},"      headers: { ",[75,614,615],{"class":92},"\"Content-Type\"",[75,617,618],{"class":85},": ",[75,620,621],{"class":92},"\"text/html\"",[75,623,415],{"class":85},[75,625,626],{"class":77,"line":152},[75,627,628],{"class":85},"    });\n",[75,630,631],{"class":77,"line":158},[75,632,633],{"class":85},"  },\n",[75,635,636],{"class":77,"line":164},[75,637,217],{"class":85},[237,639,641],{"id":640},"maxrequestbodysize",[61,642,643],{},"maxRequestBodySize",[57,645,646,647,650,651,654],{},"Maximum allowed size ",[277,648,649],{},"in bytes"," for the request body. Defaults to ",[61,652,653],{},"undefined"," (no limit).",[57,656,657,658,661,662,665,666,354,669,672,673,679,680,683],{},"As the body is read, its accumulated length is tracked and, once it exceeds the limit, reading is aborted and rejects with a ",[61,659,660],{},"413","-style error. The error carries ",[61,663,664],{},"statusCode: 413",", ",[61,667,668],{},"status: 413",[61,670,671],{},"code: \"ERR_BODY_TOO_LARGE\"",", so a handler (or ",[674,675,677],"a",{"href":676},"#onerror",[61,678,496],{},") can map it to an HTTP ",[61,681,682],{},"413 Payload Too Large"," response.",[57,685,686,687,690,691,694,695,698,699,690,702,690,705,690,708,711],{},"The limit covers both buffered reads (",[61,688,689],{},"request.text()"," / ",[61,692,693],{},"request.json()",") and the streamed body (",[61,696,697],{},"request.body",", and therefore ",[61,700,701],{},"request.arrayBuffer()",[61,703,704],{},".blob()",[61,706,707],{},".bytes()",[61,709,710],{},".formData()",").",[57,713,714],{},[277,715,371],{},[66,717,719],{"className":68,"code":718,"language":70,"meta":71,"style":71},"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",[61,720,721,733,737,743,762,785,792,816,827,843,865,870,878,883,887],{"__ignoreMap":71},[75,722,723,725,727,729,731],{"class":77,"line":78},[75,724,82],{"class":81},[75,726,86],{"class":85},[75,728,89],{"class":81},[75,730,93],{"class":92},[75,732,96],{"class":85},[75,734,735],{"class":77,"line":99},[75,736,103],{"emptyLinePlaceholder":102},[75,738,739,741],{"class":77,"line":106},[75,740,110],{"class":109},[75,742,113],{"class":85},[75,744,745,748,751,754,757,759],{"class":77,"line":116},[75,746,747],{"class":85},"  maxRequestBodySize: ",[75,749,750],{"class":129},"1024",[75,752,753],{"class":81}," *",[75,755,756],{"class":129}," 1024",[75,758,665],{"class":85},[75,760,761],{"class":119},"// 1 MiB\n",[75,763,764,766,768,771,774,777,780,782],{"class":77,"line":123},[75,765,190],{"class":109},[75,767,618],{"class":85},[75,769,770],{"class":81},"async",[75,772,773],{"class":85}," (",[75,775,776],{"class":565},"request",[75,778,779],{"class":85},") ",[75,781,196],{"class":81},[75,783,784],{"class":85}," {\n",[75,786,787,790],{"class":77,"line":136},[75,788,789],{"class":81},"    try",[75,791,784],{"class":85},[75,793,794,797,800,803,805,808,811,813],{"class":77,"line":147},[75,795,796],{"class":81},"      return",[75,798,799],{"class":85}," Response.",[75,801,802],{"class":109},"json",[75,804,205],{"class":85},[75,806,807],{"class":81},"await",[75,809,810],{"class":85}," request.",[75,812,802],{"class":109},[75,814,815],{"class":85},"());\n",[75,817,818,821,824],{"class":77,"line":152},[75,819,820],{"class":85},"    } ",[75,822,823],{"class":81},"catch",[75,825,826],{"class":85}," (error) {\n",[75,828,829,832,835,838,841],{"class":77,"line":158},[75,830,831],{"class":81},"      if",[75,833,834],{"class":85}," (error.code ",[75,836,837],{"class":81},"===",[75,839,840],{"class":92}," \"ERR_BODY_TOO_LARGE\"",[75,842,569],{"class":85},[75,844,845,848,850,852,854,857,860,862],{"class":77,"line":164},[75,846,847],{"class":81},"        return",[75,849,199],{"class":81},[75,851,202],{"class":109},[75,853,205],{"class":85},[75,855,856],{"class":92},"\"Payload Too Large\"",[75,858,859],{"class":85},", { status: ",[75,861,660],{"class":129},[75,863,864],{"class":85}," });\n",[75,866,867],{"class":77,"line":170},[75,868,869],{"class":85},"      }\n",[75,871,872,875],{"class":77,"line":176},[75,873,874],{"class":81},"      throw",[75,876,877],{"class":85}," error;\n",[75,879,880],{"class":77,"line":181},[75,881,882],{"class":85},"    }\n",[75,884,885],{"class":77,"line":187},[75,886,633],{"class":85},[75,888,889],{"class":77,"line":214},[75,890,217],{"class":85},[300,892,893,896],{},[57,894,895],{},"\nRuntime support:",[222,897,898,904,921],{},[225,899,900,903],{},[277,901,902],{},"Node",": enforced by srvx (the request body stream is size-limited).",[225,905,906,909,910,917,918,920],{},[277,907,908],{},"Bun",": forwarded to Bun's native ",[674,911,915],{"href":912,"rel":913},"https://bun.sh/docs/api/http",[914],"nofollow",[61,916,643],{},", enforced by Bun (responds with ",[61,919,660],{}," before the handler runs).",[225,922,923,926,927,930],{},[277,924,925],{},"Deno",": enforced by srvx (",[61,928,929],{},"Deno.serve"," has no native option).",[232,932,934],{"id":933},"runtime-specific-options","Runtime Specific Options",[237,936,938],{"id":937},"nodejs","Node.js",[57,940,941],{},[277,942,371],{},[66,944,946],{"className":68,"code":945,"language":70,"meta":71,"style":71},"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",[61,947,948,960,964,970,975,993,1006,1014,1018,1036],{"__ignoreMap":71},[75,949,950,952,954,956,958],{"class":77,"line":78},[75,951,82],{"class":81},[75,953,86],{"class":85},[75,955,89],{"class":81},[75,957,93],{"class":92},[75,959,96],{"class":85},[75,961,962],{"class":77,"line":99},[75,963,103],{"emptyLinePlaceholder":102},[75,965,966,968],{"class":77,"line":106},[75,967,110],{"class":109},[75,969,113],{"class":85},[75,971,972],{"class":77,"line":116},[75,973,974],{"class":85},"  node: {\n",[75,976,977,980,983,985,988,990],{"class":77,"line":123},[75,978,979],{"class":85},"    maxHeadersize: ",[75,981,982],{"class":129},"16384",[75,984,753],{"class":81},[75,986,987],{"class":129}," 2",[75,989,665],{"class":85},[75,991,992],{"class":119},"// Double default\n",[75,994,995,998,1001,1003],{"class":77,"line":136},[75,996,997],{"class":85},"    ipv6Only: ",[75,999,1000],{"class":129},"true",[75,1002,665],{"class":85},[75,1004,1005],{"class":119},"// Disable dual-stack support\n",[75,1007,1008,1011],{"class":77,"line":147},[75,1009,1010],{"class":119},"    // http2: false",[75,1012,1013],{"class":119}," // Disable http2 support (enabled by default in TLS mode)\n",[75,1015,1016],{"class":77,"line":152},[75,1017,633],{"class":85},[75,1019,1020,1022,1024,1026,1028,1030,1032,1034],{"class":77,"line":158},[75,1021,190],{"class":109},[75,1023,193],{"class":85},[75,1025,196],{"class":81},[75,1027,199],{"class":81},[75,1029,202],{"class":109},[75,1031,205],{"class":85},[75,1033,208],{"class":92},[75,1035,211],{"class":85},[75,1037,1038],{"class":77,"line":164},[75,1039,217],{"class":85},[1041,1042,1043],"read-more",{},[57,1044,1045,1046,354,1051,1056],{},"See Node.js documentation for ",[674,1047,1050],{"href":1048,"rel":1049},"https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener",[914],"ServerOptions",[674,1052,1055],{"href":1053,"rel":1054},"https://nodejs.org/api/net.html#serverlistenoptions-callback",[914],"ListenOptions"," for all available options.",[237,1058,908],{"id":1059},"bun",[57,1061,1062],{},[277,1063,371],{},[66,1065,1067],{"className":68,"code":1066,"language":70,"meta":71,"style":71},"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",[61,1068,1069,1081,1085,1091,1096,1107,1137,1150,1155,1160,1164,1182],{"__ignoreMap":71},[75,1070,1071,1073,1075,1077,1079],{"class":77,"line":78},[75,1072,82],{"class":81},[75,1074,86],{"class":85},[75,1076,89],{"class":81},[75,1078,93],{"class":92},[75,1080,96],{"class":85},[75,1082,1083],{"class":77,"line":99},[75,1084,103],{"emptyLinePlaceholder":102},[75,1086,1087,1089],{"class":77,"line":106},[75,1088,110],{"class":109},[75,1090,113],{"class":85},[75,1092,1093],{"class":77,"line":116},[75,1094,1095],{"class":85},"  bun: {\n",[75,1097,1098,1101,1103,1105],{"class":77,"line":123},[75,1099,1100],{"class":109},"    error",[75,1102,205],{"class":85},[75,1104,566],{"class":565},[75,1106,569],{"class":85},[75,1108,1109,1111,1113,1115,1117,1119,1121,1123,1125,1127,1129,1131,1133,1135],{"class":77,"line":136},[75,1110,796],{"class":81},[75,1112,199],{"class":81},[75,1114,202],{"class":109},[75,1116,205],{"class":85},[75,1118,583],{"class":92},[75,1120,566],{"class":85},[75,1122,588],{"class":92},[75,1124,591],{"class":129},[75,1126,594],{"class":92},[75,1128,566],{"class":85},[75,1130,254],{"class":92},[75,1132,601],{"class":85},[75,1134,604],{"class":92},[75,1136,607],{"class":85},[75,1138,1139,1142,1144,1146,1148],{"class":77,"line":147},[75,1140,1141],{"class":85},"        headers: { ",[75,1143,615],{"class":92},[75,1145,618],{"class":85},[75,1147,621],{"class":92},[75,1149,415],{"class":85},[75,1151,1152],{"class":77,"line":152},[75,1153,1154],{"class":85},"      });\n",[75,1156,1157],{"class":77,"line":158},[75,1158,1159],{"class":85},"    },\n",[75,1161,1162],{"class":77,"line":164},[75,1163,633],{"class":85},[75,1165,1166,1168,1170,1172,1174,1176,1178,1180],{"class":77,"line":170},[75,1167,190],{"class":109},[75,1169,193],{"class":85},[75,1171,196],{"class":81},[75,1173,199],{"class":81},[75,1175,202],{"class":109},[75,1177,205],{"class":85},[75,1179,208],{"class":92},[75,1181,211],{"class":85},[75,1183,1184],{"class":77,"line":176},[75,1185,217],{"class":85},[1041,1187,1188],{"to":912},[57,1189,1190],{},"See Bun HTTP documentation for all available options.",[237,1192,925],{"id":1193},"deno",[57,1195,1196],{},[277,1197,371],{},[66,1199,1201],{"className":68,"code":1200,"language":70,"meta":71,"style":71},"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",[61,1202,1203,1215,1219,1225,1230,1241,1271,1283,1287,1291,1295,1313],{"__ignoreMap":71},[75,1204,1205,1207,1209,1211,1213],{"class":77,"line":78},[75,1206,82],{"class":81},[75,1208,86],{"class":85},[75,1210,89],{"class":81},[75,1212,93],{"class":92},[75,1214,96],{"class":85},[75,1216,1217],{"class":77,"line":99},[75,1218,103],{"emptyLinePlaceholder":102},[75,1220,1221,1223],{"class":77,"line":106},[75,1222,110],{"class":109},[75,1224,113],{"class":85},[75,1226,1227],{"class":77,"line":116},[75,1228,1229],{"class":85},"  deno: {\n",[75,1231,1232,1235,1237,1239],{"class":77,"line":123},[75,1233,1234],{"class":109},"    onError",[75,1236,205],{"class":85},[75,1238,566],{"class":565},[75,1240,569],{"class":85},[75,1242,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269],{"class":77,"line":136},[75,1244,796],{"class":81},[75,1246,199],{"class":81},[75,1248,202],{"class":109},[75,1250,205],{"class":85},[75,1252,583],{"class":92},[75,1254,566],{"class":85},[75,1256,588],{"class":92},[75,1258,591],{"class":129},[75,1260,594],{"class":92},[75,1262,566],{"class":85},[75,1264,254],{"class":92},[75,1266,601],{"class":85},[75,1268,604],{"class":92},[75,1270,607],{"class":85},[75,1272,1273,1275,1277,1279,1281],{"class":77,"line":147},[75,1274,1141],{"class":85},[75,1276,615],{"class":92},[75,1278,618],{"class":85},[75,1280,621],{"class":92},[75,1282,415],{"class":85},[75,1284,1285],{"class":77,"line":152},[75,1286,1154],{"class":85},[75,1288,1289],{"class":77,"line":158},[75,1290,1159],{"class":85},[75,1292,1293],{"class":77,"line":164},[75,1294,633],{"class":85},[75,1296,1297,1299,1301,1303,1305,1307,1309,1311],{"class":77,"line":170},[75,1298,190],{"class":109},[75,1300,193],{"class":85},[75,1302,196],{"class":81},[75,1304,199],{"class":81},[75,1306,202],{"class":109},[75,1308,205],{"class":85},[75,1310,208],{"class":92},[75,1312,211],{"class":85},[75,1314,1315],{"class":77,"line":176},[75,1316,217],{"class":85},[1041,1318,1320],{"to":1319},"https://docs.deno.com/api/deno/~/Deno.ServeOptions",[57,1321,1322],{},"See Deno serve documentation for all available options.",[1324,1325,1326],"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":71,"searchDepth":99,"depth":99,"links":1328},[1329,1339],{"id":234,"depth":99,"text":235,"children":1330},[1331,1332,1333,1334,1335,1336,1337,1338],{"id":239,"depth":106,"text":239},{"id":267,"depth":106,"text":267},{"id":292,"depth":106,"text":295},{"id":311,"depth":106,"text":311},{"id":323,"depth":106,"text":323},{"id":361,"depth":106,"text":361},{"id":493,"depth":106,"text":496},{"id":640,"depth":106,"text":643},{"id":933,"depth":99,"text":934,"children":1340},[1341,1342,1343],{"id":937,"depth":106,"text":938},{"id":1059,"depth":106,"text":908},{"id":1193,"depth":106,"text":925},"Provide additional options to customize listening server.","md",{"icon":30},{"icon":30},{"title":27,"description":1344},"r2__G78lOS2yeDE7_YMAM1I2RJOj-t9sC0vdb60BGeE",[1351,1353],{"title":22,"path":23,"stem":24,"description":1352,"icon":25,"children":-1},"Plugins and middleware allow adding reusable server extensions.",{"title":32,"path":33,"stem":34,"description":1354,"icon":35,"children":-1},"Tips for using srvx with bundlers.",1782990663558]