[{"data":1,"prerenderedAt":2332},["ShallowReactive",2],{"navigation":3,"-guide-cli":61,"-guide-cli-surround":2327},[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,51,56],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Using CLI","/guide/cli","1.guide/10.cli","garden:terminal-cli-stroke-12",{"title":17,"path":18,"stem":19,"icon":20},"Body Size Limiting","/guide/body-limit","1.guide/11.body-limit","ri:scales-3-line",{"title":22,"path":23,"stem":24,"icon":25},"Fetch Handler","/guide/handler","1.guide/2.handler","i-fluent:target-24-regular",{"title":27,"path":28,"stem":29,"icon":30},"Server Instance","/guide/server","1.guide/3.server","radix-icons:component-instance",{"title":32,"path":33,"stem":34,"icon":35},"Middleware","/guide/middleware","1.guide/4.middleware","clarity:plugin-line",{"title":37,"path":38,"stem":39,"icon":40},"Server Options","/guide/options","1.guide/5.options","ri:settings-3-line",{"title":42,"path":43,"stem":44,"icon":45},"TLS","/guide/tls","1.guide/6.tls","ri:lock-2-line",{"title":47,"path":48,"stem":49,"icon":50},"Bundler Usage","/guide/bundler","1.guide/7.bundler","clarity:bundle-line",{"title":52,"path":53,"stem":54,"icon":55},"Node.js Support","/guide/node","1.guide/8.node","akar-icons:node-fill",{"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":12,"body":63,"description":2321,"extension":2322,"meta":2323,"navigation":2324,"path":13,"seo":2325,"stem":14,"__hash__":2326},"content/1.guide/10.cli.md",{"type":64,"value":65,"toc":2305,"icon":15},"minimark",[66,75,163,168,1260,1264,1267,1311,1315,1337,1341,1365,1369,1376,1392,1405,1408,1427,1431,1438,1591,1605,1610,1625,1647,1669,1691,1695,1698,1736,1758,1761,1767,1783,1892,1903,1914,1928,1937,1941,1964,1967,2053,2058,2067,2073,2174,2180,2251,2255,2261,2301],[67,68,69,70,74],"p",{},"You can run ",[71,72,73],"code",{},"srvx"," with your preferred runtime without installation:",[76,77,78,101,114,129,147],"CodeGroup",{},[79,80,86],"pre",{"className":81,"code":82,"filename":83,"language":84,"meta":85,"style":85},"language-bash shiki shiki-themes github-light github-dark github-dark","npx srvx\n","npm","bash","",[71,87,88],{"__ignoreMap":85},[89,90,93,97],"span",{"class":91,"line":92},"line",1,[89,94,96],{"class":95},"shcOC","npx",[89,98,100],{"class":99},"sfrk1"," srvx\n",[79,102,105],{"className":81,"code":103,"filename":104,"language":84,"meta":85,"style":85},"pnpx srvx\n","pnpm",[71,106,107],{"__ignoreMap":85},[89,108,109,112],{"class":91,"line":92},[89,110,111],{"class":95},"pnpx",[89,113,100],{"class":99},[79,115,118],{"className":81,"code":116,"filename":117,"language":84,"meta":85,"style":85},"yarn dlx srvx\n","yarn",[71,119,120],{"__ignoreMap":85},[89,121,122,124,127],{"class":91,"line":92},[89,123,117],{"class":95},[89,125,126],{"class":99}," dlx",[89,128,100],{"class":99},[79,130,133],{"className":81,"code":131,"filename":132,"language":84,"meta":85,"style":85},"deno -A npm:srvx\n","Deno",[71,134,135],{"__ignoreMap":85},[89,136,137,140,144],{"class":91,"line":92},[89,138,139],{"class":95},"deno",[89,141,143],{"class":142},"suiK_"," -A",[89,145,146],{"class":99}," npm:srvx\n",[79,148,151],{"className":81,"code":149,"filename":150,"language":84,"meta":85,"style":85},"bunx --bun srvx\n","Bun",[71,152,153],{"__ignoreMap":85},[89,154,155,158,161],{"class":91,"line":92},[89,156,157],{"class":95},"bunx",[89,159,160],{"class":142}," --bun",[89,162,100],{"class":99},[164,165,167],"h2",{"id":166},"usage","Usage",[79,169,173],{"className":170,"code":171,"language":172,"meta":85,"style":85},"language-sh shiki shiki-themes github-light github-dark github-dark","srvx   - Universal Server.\n\nSERVE MODE\n\n# srvx serve [options]\n$ srvx serve --entry ./server.ts    # Start development server\n$ srvx serve --prod                 # Start production  server\n$ srvx serve --port=8080            # Listen on port 8080\n$ srvx serve --host=localhost       # Bind to localhost only\n$ srvx serve --static=./dist        # Serve static files (no entry needed)\n$ srvx serve --import=jiti/register # Enable [jiti](https://github.com/unjs/jiti) loader\n$ srvx serve --tls --cert=cert.pem --key=key.pem  # Enable TLS (HTTPS/HTTP2)\n\nFETCH MODE\n\n# srvx fetch|curl [options] [url]\n$ srvx fetch                  # Fetch from default entry\n$ srvx fetch /api/users       # Fetch a specific URL/path\n$ srvx fetch --entry ./server.ts /api/users # Fetch using a specific entry\n$ srvx fetch -X POST /api/users # POST request\n$ srvx fetch -H \"Content-Type: application/json\" /api # With headers\n$ srvx fetch -d '{\"name\":\"foo\"}' /api # With request body\n$ srvx fetch -v /api/users    # Verbose output (show headers)\n$ echo '{\"name\":\"foo\"}' | srvx fetch -d @- /api # Body from stdin\n\nCOMMON OPTIONS\n\n  --entry \u003Cfile>            Server entry file to use\n  --dir \u003Cdir>               Working directory for resolving entry file\n  -h, --help                Show this help message\n  --version                 Show server and runtime versions\n\nSERVE OPTIONS\n\n  -p, --port \u003Cport>         Port to listen on (default: 3000)\n  --host, --hostname \u003Chost> Host to bind to (default: all interfaces)\n  -s, --static \u003Cdir>        Serve static files from the specified directory (default: public)\n  --prod                    Run in production mode (no watch, no debug)\n  --import \u003Cloader>         ES module to preload\n  --tls                     Enable TLS (HTTPS/HTTP2)\n  --cert \u003Cfile>             TLS certificate file\n  --key  \u003Cfile>             TLS private key file\n\nFETCH OPTIONS\n\n  -X, --method \u003Cmethod>     HTTP method (default: GET, or POST if body is provided; --request is a curl alias)\n  -H, --header \u003Cheader>     Add header (format: \"Name: Value\", can be used multiple times)\n  -d, --data \u003Cdata>         Request body (use @- for stdin, @file for file)\n  --host \u003Chost>             Host for a schemeless URL/path (default: localhost)\n  --tls                     Use https for a schemeless URL/path\n  -v, --verbose             Show request and response headers\n\n  Exits with code 22 on a non-2xx response (like curl --fail).\n\nENVIRONMENT\n\n  PORT                      Default port to listen on\n  HOST                      Default host to bind to\n  NODE_ENV                  Set to production for production mode.\n","sh",[71,174,175,188,195,204,209,216,237,252,267,282,297,312,333,338,346,351,357,370,385,403,423,444,464,481,509,514,523,528,562,595,616,637,642,649,654,693,731,775,807,833,848,870,895,900,907,912,978,1025,1069,1103,1123,1146,1151,1187,1192,1198,1203,1222,1240],{"__ignoreMap":85},[89,176,177,179,182,185],{"class":91,"line":92},[89,178,73],{"class":95},[89,180,181],{"class":99},"   -",[89,183,184],{"class":99}," Universal",[89,186,187],{"class":99}," Server.\n",[89,189,191],{"class":91,"line":190},2,[89,192,194],{"emptyLinePlaceholder":193},true,"\n",[89,196,198,201],{"class":91,"line":197},3,[89,199,200],{"class":95},"SERVE",[89,202,203],{"class":99}," MODE\n",[89,205,207],{"class":91,"line":206},4,[89,208,194],{"emptyLinePlaceholder":193},[89,210,212],{"class":91,"line":211},5,[89,213,215],{"class":214},"sCsY4","# srvx serve [options]\n",[89,217,219,222,225,228,231,234],{"class":91,"line":218},6,[89,220,221],{"class":95},"$",[89,223,224],{"class":99}," srvx",[89,226,227],{"class":99}," serve",[89,229,230],{"class":142}," --entry",[89,232,233],{"class":99}," ./server.ts",[89,235,236],{"class":214},"    # Start development server\n",[89,238,240,242,244,246,249],{"class":91,"line":239},7,[89,241,221],{"class":95},[89,243,224],{"class":99},[89,245,227],{"class":99},[89,247,248],{"class":142}," --prod",[89,250,251],{"class":214},"                 # Start production  server\n",[89,253,255,257,259,261,264],{"class":91,"line":254},8,[89,256,221],{"class":95},[89,258,224],{"class":99},[89,260,227],{"class":99},[89,262,263],{"class":142}," --port=8080",[89,265,266],{"class":214},"            # Listen on port 8080\n",[89,268,270,272,274,276,279],{"class":91,"line":269},9,[89,271,221],{"class":95},[89,273,224],{"class":99},[89,275,227],{"class":99},[89,277,278],{"class":142}," --host=localhost",[89,280,281],{"class":214},"       # Bind to localhost only\n",[89,283,285,287,289,291,294],{"class":91,"line":284},10,[89,286,221],{"class":95},[89,288,224],{"class":99},[89,290,227],{"class":99},[89,292,293],{"class":142}," --static=./dist",[89,295,296],{"class":214},"        # Serve static files (no entry needed)\n",[89,298,300,302,304,306,309],{"class":91,"line":299},11,[89,301,221],{"class":95},[89,303,224],{"class":99},[89,305,227],{"class":99},[89,307,308],{"class":142}," --import=jiti/register",[89,310,311],{"class":214}," # Enable [jiti](https://github.com/unjs/jiti) loader\n",[89,313,315,317,319,321,324,327,330],{"class":91,"line":314},12,[89,316,221],{"class":95},[89,318,224],{"class":99},[89,320,227],{"class":99},[89,322,323],{"class":142}," --tls",[89,325,326],{"class":142}," --cert=cert.pem",[89,328,329],{"class":142}," --key=key.pem",[89,331,332],{"class":214},"  # Enable TLS (HTTPS/HTTP2)\n",[89,334,336],{"class":91,"line":335},13,[89,337,194],{"emptyLinePlaceholder":193},[89,339,341,344],{"class":91,"line":340},14,[89,342,343],{"class":95},"FETCH",[89,345,203],{"class":99},[89,347,349],{"class":91,"line":348},15,[89,350,194],{"emptyLinePlaceholder":193},[89,352,354],{"class":91,"line":353},16,[89,355,356],{"class":214},"# srvx fetch|curl [options] [url]\n",[89,358,360,362,364,367],{"class":91,"line":359},17,[89,361,221],{"class":95},[89,363,224],{"class":99},[89,365,366],{"class":99}," fetch",[89,368,369],{"class":214},"                  # Fetch from default entry\n",[89,371,373,375,377,379,382],{"class":91,"line":372},18,[89,374,221],{"class":95},[89,376,224],{"class":99},[89,378,366],{"class":99},[89,380,381],{"class":99}," /api/users",[89,383,384],{"class":214},"       # Fetch a specific URL/path\n",[89,386,388,390,392,394,396,398,400],{"class":91,"line":387},19,[89,389,221],{"class":95},[89,391,224],{"class":99},[89,393,366],{"class":99},[89,395,230],{"class":142},[89,397,233],{"class":99},[89,399,381],{"class":99},[89,401,402],{"class":214}," # Fetch using a specific entry\n",[89,404,406,408,410,412,415,418,420],{"class":91,"line":405},20,[89,407,221],{"class":95},[89,409,224],{"class":99},[89,411,366],{"class":99},[89,413,414],{"class":142}," -X",[89,416,417],{"class":99}," POST",[89,419,381],{"class":99},[89,421,422],{"class":214}," # POST request\n",[89,424,426,428,430,432,435,438,441],{"class":91,"line":425},21,[89,427,221],{"class":95},[89,429,224],{"class":99},[89,431,366],{"class":99},[89,433,434],{"class":142}," -H",[89,436,437],{"class":99}," \"Content-Type: application/json\"",[89,439,440],{"class":99}," /api",[89,442,443],{"class":214}," # With headers\n",[89,445,447,449,451,453,456,459,461],{"class":91,"line":446},22,[89,448,221],{"class":95},[89,450,224],{"class":99},[89,452,366],{"class":99},[89,454,455],{"class":142}," -d",[89,457,458],{"class":99}," '{\"name\":\"foo\"}'",[89,460,440],{"class":99},[89,462,463],{"class":214}," # With request body\n",[89,465,467,469,471,473,476,478],{"class":91,"line":466},23,[89,468,221],{"class":95},[89,470,224],{"class":99},[89,472,366],{"class":99},[89,474,475],{"class":142}," -v",[89,477,381],{"class":99},[89,479,480],{"class":214},"    # Verbose output (show headers)\n",[89,482,484,486,489,491,495,497,499,501,504,506],{"class":91,"line":483},24,[89,485,221],{"class":95},[89,487,488],{"class":99}," echo",[89,490,458],{"class":99},[89,492,494],{"class":493},"so5gQ"," |",[89,496,224],{"class":95},[89,498,366],{"class":99},[89,500,455],{"class":142},[89,502,503],{"class":99}," @-",[89,505,440],{"class":99},[89,507,508],{"class":214}," # Body from stdin\n",[89,510,512],{"class":91,"line":511},25,[89,513,194],{"emptyLinePlaceholder":193},[89,515,517,520],{"class":91,"line":516},26,[89,518,519],{"class":95},"COMMON",[89,521,522],{"class":99}," OPTIONS\n",[89,524,526],{"class":91,"line":525},27,[89,527,194],{"emptyLinePlaceholder":193},[89,529,531,534,537,540,544,547,550,553,556,559],{"class":91,"line":530},28,[89,532,533],{"class":95},"  --entry",[89,535,536],{"class":493}," \u003C",[89,538,539],{"class":99},"fil",[89,541,543],{"class":542},"slsVL","e",[89,545,546],{"class":493},">",[89,548,549],{"class":99},"            Server",[89,551,552],{"class":99}," entry",[89,554,555],{"class":99}," file",[89,557,558],{"class":99}," to",[89,560,561],{"class":99}," use\n",[89,563,565,568,570,573,576,578,581,584,587,590,592],{"class":91,"line":564},29,[89,566,567],{"class":95},"  --dir",[89,569,536],{"class":493},[89,571,572],{"class":99},"di",[89,574,575],{"class":542},"r",[89,577,546],{"class":493},[89,579,580],{"class":99},"               Working",[89,582,583],{"class":99}," directory",[89,585,586],{"class":99}," for",[89,588,589],{"class":99}," resolving",[89,591,552],{"class":99},[89,593,594],{"class":99}," file\n",[89,596,598,601,604,607,610,613],{"class":91,"line":597},30,[89,599,600],{"class":95},"  -h,",[89,602,603],{"class":142}," --help",[89,605,606],{"class":99},"                Show",[89,608,609],{"class":99}," this",[89,611,612],{"class":99}," help",[89,614,615],{"class":99}," message\n",[89,617,619,622,625,628,631,634],{"class":91,"line":618},31,[89,620,621],{"class":95},"  --version",[89,623,624],{"class":99},"                 Show",[89,626,627],{"class":99}," server",[89,629,630],{"class":99}," and",[89,632,633],{"class":99}," runtime",[89,635,636],{"class":99}," versions\n",[89,638,640],{"class":91,"line":639},32,[89,641,194],{"emptyLinePlaceholder":193},[89,643,645,647],{"class":91,"line":644},33,[89,646,200],{"class":95},[89,648,522],{"class":99},[89,650,652],{"class":91,"line":651},34,[89,653,194],{"emptyLinePlaceholder":193},[89,655,657,660,663,665,668,671,673,676,678,681,684,687,690],{"class":91,"line":656},35,[89,658,659],{"class":95},"  -p,",[89,661,662],{"class":142}," --port",[89,664,536],{"class":493},[89,666,667],{"class":99},"por",[89,669,670],{"class":542},"t",[89,672,546],{"class":493},[89,674,675],{"class":99},"         Port",[89,677,558],{"class":99},[89,679,680],{"class":99}," listen",[89,682,683],{"class":99}," on",[89,685,686],{"class":542}," (default: ",[89,688,689],{"class":142},"3000",[89,691,692],{"class":542},")\n",[89,694,696,699,702,704,707,709,711,714,716,719,721,723,726,729],{"class":91,"line":695},36,[89,697,698],{"class":95},"  --host,",[89,700,701],{"class":142}," --hostname",[89,703,536],{"class":493},[89,705,706],{"class":99},"hos",[89,708,670],{"class":542},[89,710,546],{"class":493},[89,712,713],{"class":99}," Host",[89,715,558],{"class":99},[89,717,718],{"class":99}," bind",[89,720,558],{"class":99},[89,722,686],{"class":542},[89,724,725],{"class":99},"all",[89,727,728],{"class":99}," interfaces",[89,730,692],{"class":542},[89,732,734,737,740,742,744,746,748,751,754,757,760,763,766,768,770,773],{"class":91,"line":733},37,[89,735,736],{"class":95},"  -s,",[89,738,739],{"class":142}," --static",[89,741,536],{"class":493},[89,743,572],{"class":99},[89,745,575],{"class":542},[89,747,546],{"class":493},[89,749,750],{"class":99},"        Serve",[89,752,753],{"class":99}," static",[89,755,756],{"class":99}," files",[89,758,759],{"class":99}," from",[89,761,762],{"class":99}," the",[89,764,765],{"class":99}," specified",[89,767,583],{"class":99},[89,769,686],{"class":542},[89,771,772],{"class":99},"public",[89,774,692],{"class":542},[89,776,778,781,784,787,790,793,796,799,802,805],{"class":91,"line":777},38,[89,779,780],{"class":95},"  --prod",[89,782,783],{"class":99},"                    Run",[89,785,786],{"class":99}," in",[89,788,789],{"class":99}," production",[89,791,792],{"class":99}," mode",[89,794,795],{"class":542}," (no ",[89,797,798],{"class":99},"watch,",[89,800,801],{"class":99}," no",[89,803,804],{"class":99}," debug",[89,806,692],{"class":542},[89,808,810,813,815,818,820,822,825,828,830],{"class":91,"line":809},39,[89,811,812],{"class":95},"  --import",[89,814,536],{"class":493},[89,816,817],{"class":99},"loade",[89,819,575],{"class":542},[89,821,546],{"class":493},[89,823,824],{"class":99},"         ES",[89,826,827],{"class":99}," module",[89,829,558],{"class":99},[89,831,832],{"class":99}," preload\n",[89,834,836,839,842,845],{"class":91,"line":835},40,[89,837,838],{"class":95},"  --tls",[89,840,841],{"class":99},"                     Enable",[89,843,844],{"class":99}," TLS",[89,846,847],{"class":542}," (HTTPS/HTTP2)\n",[89,849,851,854,856,858,860,862,865,868],{"class":91,"line":850},41,[89,852,853],{"class":95},"  --cert",[89,855,536],{"class":493},[89,857,539],{"class":99},[89,859,543],{"class":542},[89,861,546],{"class":493},[89,863,864],{"class":99},"             TLS",[89,866,867],{"class":99}," certificate",[89,869,594],{"class":99},[89,871,873,876,879,881,883,885,887,890,893],{"class":91,"line":872},42,[89,874,875],{"class":95},"  --key",[89,877,878],{"class":493},"  \u003C",[89,880,539],{"class":99},[89,882,543],{"class":542},[89,884,546],{"class":493},[89,886,864],{"class":99},[89,888,889],{"class":99}," private",[89,891,892],{"class":99}," key",[89,894,594],{"class":99},[89,896,898],{"class":91,"line":897},43,[89,899,194],{"emptyLinePlaceholder":193},[89,901,903,905],{"class":91,"line":902},44,[89,904,343],{"class":95},[89,906,522],{"class":99},[89,908,910],{"class":91,"line":909},45,[89,911,194],{"emptyLinePlaceholder":193},[89,913,915,918,921,923,926,929,931,934,937,939,942,945,947,950,953,956,959,962,965,967,970,973,976],{"class":91,"line":914},46,[89,916,917],{"class":95},"  -X,",[89,919,920],{"class":142}," --method",[89,922,536],{"class":493},[89,924,925],{"class":99},"metho",[89,927,928],{"class":542},"d",[89,930,546],{"class":493},[89,932,933],{"class":99},"     HTTP",[89,935,936],{"class":99}," method",[89,938,686],{"class":542},[89,940,941],{"class":99},"GET,",[89,943,944],{"class":99}," or",[89,946,417],{"class":99},[89,948,949],{"class":99}," if",[89,951,952],{"class":99}," body",[89,954,955],{"class":99}," is",[89,957,958],{"class":99}," provided",[89,960,961],{"class":542},"; ",[89,963,964],{"class":95},"--request",[89,966,955],{"class":99},[89,968,969],{"class":99}," a",[89,971,972],{"class":99}," curl",[89,974,975],{"class":99}," alias",[89,977,692],{"class":542},[89,979,981,984,987,989,992,994,996,999,1002,1005,1008,1011,1014,1017,1020,1023],{"class":91,"line":980},47,[89,982,983],{"class":95},"  -H,",[89,985,986],{"class":142}," --header",[89,988,536],{"class":493},[89,990,991],{"class":99},"heade",[89,993,575],{"class":542},[89,995,546],{"class":493},[89,997,998],{"class":99},"     Add",[89,1000,1001],{"class":99}," header",[89,1003,1004],{"class":542}," (format: ",[89,1006,1007],{"class":99},"\"Name: Value\",",[89,1009,1010],{"class":99}," can",[89,1012,1013],{"class":99}," be",[89,1015,1016],{"class":99}," used",[89,1018,1019],{"class":99}," multiple",[89,1021,1022],{"class":99}," times",[89,1024,692],{"class":542},[89,1026,1028,1031,1034,1036,1039,1042,1044,1047,1049,1052,1055,1057,1060,1063,1065,1067],{"class":91,"line":1027},48,[89,1029,1030],{"class":95},"  -d,",[89,1032,1033],{"class":142}," --data",[89,1035,536],{"class":493},[89,1037,1038],{"class":99},"dat",[89,1040,1041],{"class":542},"a",[89,1043,546],{"class":493},[89,1045,1046],{"class":99},"         Request",[89,1048,952],{"class":99},[89,1050,1051],{"class":542}," (use ",[89,1053,1054],{"class":99},"@-",[89,1056,586],{"class":99},[89,1058,1059],{"class":99}," stdin,",[89,1061,1062],{"class":99}," @file",[89,1064,586],{"class":99},[89,1066,555],{"class":99},[89,1068,692],{"class":542},[89,1070,1072,1075,1077,1079,1081,1083,1086,1088,1090,1093,1096,1098,1101],{"class":91,"line":1071},49,[89,1073,1074],{"class":95},"  --host",[89,1076,536],{"class":493},[89,1078,706],{"class":99},[89,1080,670],{"class":542},[89,1082,546],{"class":493},[89,1084,1085],{"class":99},"             Host",[89,1087,586],{"class":99},[89,1089,969],{"class":99},[89,1091,1092],{"class":99}," schemeless",[89,1094,1095],{"class":99}," URL/path",[89,1097,686],{"class":542},[89,1099,1100],{"class":99},"localhost",[89,1102,692],{"class":542},[89,1104,1106,1108,1111,1114,1116,1118,1120],{"class":91,"line":1105},50,[89,1107,838],{"class":95},[89,1109,1110],{"class":99},"                     Use",[89,1112,1113],{"class":99}," https",[89,1115,586],{"class":99},[89,1117,969],{"class":99},[89,1119,1092],{"class":99},[89,1121,1122],{"class":99}," URL/path\n",[89,1124,1126,1129,1132,1135,1138,1140,1143],{"class":91,"line":1125},51,[89,1127,1128],{"class":95},"  -v,",[89,1130,1131],{"class":142}," --verbose",[89,1133,1134],{"class":99},"             Show",[89,1136,1137],{"class":99}," request",[89,1139,630],{"class":99},[89,1141,1142],{"class":99}," response",[89,1144,1145],{"class":99}," headers\n",[89,1147,1149],{"class":91,"line":1148},52,[89,1150,194],{"emptyLinePlaceholder":193},[89,1152,1154,1157,1160,1163,1166,1168,1170,1173,1175,1178,1181,1184],{"class":91,"line":1153},53,[89,1155,1156],{"class":95},"  Exits",[89,1158,1159],{"class":99}," with",[89,1161,1162],{"class":99}," code",[89,1164,1165],{"class":142}," 22",[89,1167,683],{"class":99},[89,1169,969],{"class":99},[89,1171,1172],{"class":99}," non-2xx",[89,1174,1142],{"class":99},[89,1176,1177],{"class":542}," (like ",[89,1179,1180],{"class":99},"curl",[89,1182,1183],{"class":142}," --fail",[89,1185,1186],{"class":542},").\n",[89,1188,1190],{"class":91,"line":1189},54,[89,1191,194],{"emptyLinePlaceholder":193},[89,1193,1195],{"class":91,"line":1194},55,[89,1196,1197],{"class":95},"ENVIRONMENT\n",[89,1199,1201],{"class":91,"line":1200},56,[89,1202,194],{"emptyLinePlaceholder":193},[89,1204,1206,1209,1212,1215,1217,1219],{"class":91,"line":1205},57,[89,1207,1208],{"class":95},"  PORT",[89,1210,1211],{"class":99},"                      Default",[89,1213,1214],{"class":99}," port",[89,1216,558],{"class":99},[89,1218,680],{"class":99},[89,1220,1221],{"class":99}," on\n",[89,1223,1225,1228,1230,1233,1235,1237],{"class":91,"line":1224},58,[89,1226,1227],{"class":95},"  HOST",[89,1229,1211],{"class":99},[89,1231,1232],{"class":99}," host",[89,1234,558],{"class":99},[89,1236,718],{"class":99},[89,1238,1239],{"class":99}," to\n",[89,1241,1243,1246,1249,1251,1253,1255,1257],{"class":91,"line":1242},59,[89,1244,1245],{"class":95},"  NODE_ENV",[89,1247,1248],{"class":99},"                  Set",[89,1250,558],{"class":99},[89,1252,789],{"class":99},[89,1254,586],{"class":99},[89,1256,789],{"class":99},[89,1258,1259],{"class":99}," mode.\n",[164,1261,1263],{"id":1262},"port-and-host-precedence","Port and host precedence",[67,1265,1266],{},"The port and host are resolved with the following precedence (highest first):",[1268,1269,1271,1286,1296,1305],"steps",{"level":1270},"4",[1272,1273,1274,1275,1278,1279,1278,1282,1285],"h4",{},"CLI flag (",[71,1276,1277],{},"--port"," / ",[71,1280,1281],{},"--host",[71,1283,1284],{},"--hostname",")",[1272,1287,1288,1289,1278,1292,1295],{},"Module option (",[71,1290,1291],{},"port",[71,1293,1294],{},"hostname"," exported from your server entry)",[1272,1297,1298,1299,1278,1302,1285],{},"Environment variable (",[71,1300,1301],{},"PORT",[71,1303,1304],{},"HOST",[1272,1306,1307,1308,1310],{},"Default (",[71,1309,689],{}," / all interfaces)",[164,1312,1314],{"id":1313},"exit-codes","Exit codes",[67,1316,1317,1318,1322,1323,1326,1327,1332,1333,1336],{},"In ",[1319,1320,1321],"strong",{},"fetch mode",", ",[71,1324,1325],{},"srvx fetch"," exits with code ",[1319,1328,1329],{},[71,1330,1331],{},"22"," for any non-2xx response, and ",[71,1334,1335],{},"0"," for a 2xx response.",[164,1338,1340],{"id":1339},"runtime-notes","Runtime notes",[1342,1343,1344],"note",{},[67,1345,1346,1347,1350,1351,1354,1355,1358,1359,1361,1362,1364],{},"\nThe ",[71,1348,1349],{},"--import"," flag preloads an ES module (e.g. a loader like ",[71,1352,1353],{},"jiti/register","). It is applied on ",[1319,1356,1357],{},"Node.js and Bun only"," — on ",[1319,1360,132],{}," it is silently ignored, since Deno does not support Node's ",[71,1363,1349],{}," preload flag.",[164,1366,1368],{"id":1367},"serving-static-files","Serving static files",[67,1370,1371,1372,1375],{},"The CLI can serve a directory of static files. No server entry is required — point ",[71,1373,1374],{},"--static"," at any folder:",[79,1377,1379],{"className":81,"code":1378,"language":84,"meta":85,"style":85},"npx srvx --static ./dist\n",[71,1380,1381],{"__ignoreMap":85},[89,1382,1383,1385,1387,1389],{"class":91,"line":92},[89,1384,96],{"class":95},[89,1386,224],{"class":99},[89,1388,739],{"class":142},[89,1390,1391],{"class":99}," ./dist\n",[67,1393,1394,1395,1397,1398,1401,1402,1404],{},"If ",[71,1396,1374],{}," is omitted, srvx serves files from a ",[71,1399,1400],{},"public/"," directory when one exists, and skips static serving when it does not. Passing ",[71,1403,1374],{}," explicitly asserts the directory exists: srvx errors out if it is missing, rather than starting up and serving nothing.",[67,1406,1407],{},"When both a server entry and a static directory are present, static files take priority and unmatched requests fall through to your handler.",[67,1409,1410,1411,1414,1415,1418,1419,1422,1423,1426],{},"Static serving includes automatic ",[71,1412,1413],{},"index.html"," resolution, ",[71,1416,1417],{},".html"," extension fallback (e.g. ",[71,1420,1421],{},"/about"," → ",[71,1424,1425],{},"about.html","), common MIME types, gzip/Brotli compression, and path-traversal protection.",[164,1428,1430],{"id":1429},"programmatic-api","Programmatic API",[67,1432,1433,1434,1437],{},"Both CLI modes are built on ",[71,1435,1436],{},"srvx/loader",". The same loader is available to you, so you can build a dev server, a test harness, or a framework CLI that accepts any server entry srvx accepts — without reimplementing entry discovery or handler detection.",[79,1439,1443],{"className":1440,"code":1441,"language":1442,"meta":85,"style":85},"language-ts shiki shiki-themes github-light github-dark github-dark","import { loadServerEntry } from \"srvx/loader\";\nimport { serve } from \"srvx\";\n\nconst loaded = await loadServerEntry({ entry: \"./server.ts\" });\n\nif (loaded.notFound) {\n  throw new Error(\"No server entry found\");\n}\n\nif (!loaded.fetch) {\n  throw new Error(\"Server entry exports no fetch handler\");\n}\n\nserve({ fetch: loaded.fetch });\n","ts",[71,1444,1445,1462,1476,1480,1506,1510,1518,1538,1543,1547,1560,1575,1579,1583],{"__ignoreMap":85},[89,1446,1447,1450,1453,1456,1459],{"class":91,"line":92},[89,1448,1449],{"class":493},"import",[89,1451,1452],{"class":542}," { loadServerEntry } ",[89,1454,1455],{"class":493},"from",[89,1457,1458],{"class":99}," \"srvx/loader\"",[89,1460,1461],{"class":542},";\n",[89,1463,1464,1466,1469,1471,1474],{"class":91,"line":190},[89,1465,1449],{"class":493},[89,1467,1468],{"class":542}," { serve } ",[89,1470,1455],{"class":493},[89,1472,1473],{"class":99}," \"srvx\"",[89,1475,1461],{"class":542},[89,1477,1478],{"class":91,"line":197},[89,1479,194],{"emptyLinePlaceholder":193},[89,1481,1482,1485,1488,1491,1494,1497,1500,1503],{"class":91,"line":206},[89,1483,1484],{"class":493},"const",[89,1486,1487],{"class":142}," loaded",[89,1489,1490],{"class":493}," =",[89,1492,1493],{"class":493}," await",[89,1495,1496],{"class":95}," loadServerEntry",[89,1498,1499],{"class":542},"({ entry: ",[89,1501,1502],{"class":99},"\"./server.ts\"",[89,1504,1505],{"class":542}," });\n",[89,1507,1508],{"class":91,"line":211},[89,1509,194],{"emptyLinePlaceholder":193},[89,1511,1512,1515],{"class":91,"line":218},[89,1513,1514],{"class":493},"if",[89,1516,1517],{"class":542}," (loaded.notFound) {\n",[89,1519,1520,1523,1526,1529,1532,1535],{"class":91,"line":239},[89,1521,1522],{"class":493},"  throw",[89,1524,1525],{"class":493}," new",[89,1527,1528],{"class":95}," Error",[89,1530,1531],{"class":542},"(",[89,1533,1534],{"class":99},"\"No server entry found\"",[89,1536,1537],{"class":542},");\n",[89,1539,1540],{"class":91,"line":254},[89,1541,1542],{"class":542},"}\n",[89,1544,1545],{"class":91,"line":269},[89,1546,194],{"emptyLinePlaceholder":193},[89,1548,1549,1551,1554,1557],{"class":91,"line":284},[89,1550,1514],{"class":493},[89,1552,1553],{"class":542}," (",[89,1555,1556],{"class":493},"!",[89,1558,1559],{"class":542},"loaded.fetch) {\n",[89,1561,1562,1564,1566,1568,1570,1573],{"class":91,"line":299},[89,1563,1522],{"class":493},[89,1565,1525],{"class":493},[89,1567,1528],{"class":95},[89,1569,1531],{"class":542},[89,1571,1572],{"class":99},"\"Server entry exports no fetch handler\"",[89,1574,1537],{"class":542},[89,1576,1577],{"class":91,"line":314},[89,1578,1542],{"class":542},[89,1580,1581],{"class":91,"line":335},[89,1582,194],{"emptyLinePlaceholder":193},[89,1584,1585,1588],{"class":91,"line":340},[89,1586,1587],{"class":95},"serve",[89,1589,1590],{"class":542},"({ fetch: loaded.fetch });\n",[67,1592,1593,1596,1597,1600,1601,1604],{},[71,1594,1595],{},"loadServerEntry(opts)"," imports a server entry module and resolves a web ",[71,1598,1599],{},"fetch"," handler from it. It never throws for a missing entry — check ",[71,1602,1603],{},"notFound"," on the result instead.",[1606,1607,1609],"h3",{"id":1608},"entry-resolution","Entry resolution",[67,1611,1612,1613,1616,1617,1620,1621,1624],{},"When ",[71,1614,1615],{},"entry"," is set, it is resolved against ",[71,1618,1619],{},"dir"," (or the current working directory). A ",[71,1622,1623],{},"file://"," URL is used as-is.",[67,1626,1612,1627,1629,1630,1632,1633,1322,1636,1322,1639,1642,1643,1646],{},[71,1628,1615],{}," is omitted, the loader searches ",[71,1631,1619],{}," for the first match of each of these base names, trying ",[71,1634,1635],{},".mjs",[71,1637,1638],{},".js",[71,1640,1641],{},".mts",", then ",[71,1644,1645],{},".ts"," for each:",[1268,1648,1649,1654,1659,1664],{"level":1270},[1272,1650,1651],{},[71,1652,1653],{},"server",[1272,1655,1656],{},[71,1657,1658],{},"server/index",[1272,1660,1661],{},[71,1662,1663],{},"src/server",[1272,1665,1666],{},[71,1667,1668],{},"server/server",[67,1670,1671,1672,1675,1676,1679,1680,1683,1684,1686,1687,1690],{},"Both lists are exported as ",[71,1673,1674],{},"defaultEntries"," and ",[71,1677,1678],{},"defaultExts"," if you need to reuse them (for example, to build a file watcher). If nothing matches, the result is ",[71,1681,1682],{},"{ notFound: true }"," with no ",[71,1685,1599],{}," and no ",[71,1688,1689],{},"module",".",[1606,1692,1694],{"id":1693},"handler-resolution","Handler resolution",[67,1696,1697],{},"Once the module is imported, the loader looks for a handler in this order:",[1268,1699,1700,1705,1710,1716,1730],{"level":1270},[1272,1701,1702],{},[71,1703,1704],{},"module.fetch",[1272,1706,1707],{},[71,1708,1709],{},"module.default.fetch",[1272,1711,1712,1715],{},[71,1713,1714],{},"module.default.default.fetch"," (a double-default from a transpiled CommonJS entry)",[1272,1717,1718,1719,1721,1722,1725,1726,1285],{},"The ",[71,1720,1599],{}," of a server the entry created by calling ",[71,1723,1724],{},"serve()"," (see ",[1041,1727,1729],{"href":1728},"#loading-entries-that-start-a-server","Loading entries that start a server",[1272,1731,1732,1735],{},[71,1733,1734],{},"module.default",", if it is a function taking fewer than two arguments",[67,1737,1738,1739,1742,1743,1746,1747,1750,1751,1753,1754,1757],{},"If none match and ",[71,1740,1741],{},"nodeCompat"," is not disabled, a legacy Node.js ",[71,1744,1745],{},"(req, res)"," handler is wrapped into a fetch handler and ",[71,1748,1749],{},"nodeCompat: true"," is set on the result. Both ",[71,1752,1734],{}," and a handler captured from ",[71,1755,1756],{},"http.createServer()"," are eligible.",[1606,1759,1729],{"id":1760},"loading-entries-that-start-a-server",[67,1762,1763,1764,1690],{},"Most server entries do not export a handler — they start listening as a side effect of being imported. The loader intercepts the listen call, so importing the entry gives you its handler ",[1319,1765,1766],{},"without binding a port",[67,1768,1769,1770,1772,1773,1776,1777,1779,1780,1782],{},"If the entry calls srvx's own ",[71,1771,1724],{},", the loader hands you back that server instance as ",[71,1774,1775],{},"srvxServer",", and its handler as ",[71,1778,1599],{},". The server is fully constructed but never listens. Because the entry's ",[71,1781,1724],{}," call runs during the import, the instance does not exist yet when you pass options — use a getter to close the loop:",[79,1784,1786],{"className":1440,"code":1785,"language":1442,"meta":85,"style":85},"let server: Server | undefined;\n\nconst loaded = await loadServerEntry({\n  entry: \"./server.ts\",\n  get srvxServer() {\n    return server;\n  },\n});\n\nserver = serve({ fetch: loaded.fetch!, port: 3000 });\n",[71,1787,1788,1808,1812,1827,1837,1848,1856,1861,1866,1870],{"__ignoreMap":85},[89,1789,1790,1793,1795,1798,1801,1803,1806],{"class":91,"line":92},[89,1791,1792],{"class":493},"let",[89,1794,627],{"class":542},[89,1796,1797],{"class":493},":",[89,1799,1800],{"class":95}," Server",[89,1802,494],{"class":493},[89,1804,1805],{"class":142}," undefined",[89,1807,1461],{"class":542},[89,1809,1810],{"class":91,"line":190},[89,1811,194],{"emptyLinePlaceholder":193},[89,1813,1814,1816,1818,1820,1822,1824],{"class":91,"line":197},[89,1815,1484],{"class":493},[89,1817,1487],{"class":142},[89,1819,1490],{"class":493},[89,1821,1493],{"class":493},[89,1823,1496],{"class":95},[89,1825,1826],{"class":542},"({\n",[89,1828,1829,1832,1834],{"class":91,"line":206},[89,1830,1831],{"class":542},"  entry: ",[89,1833,1502],{"class":99},[89,1835,1836],{"class":542},",\n",[89,1838,1839,1842,1845],{"class":91,"line":211},[89,1840,1841],{"class":493},"  get",[89,1843,1844],{"class":95}," srvxServer",[89,1846,1847],{"class":542},"() {\n",[89,1849,1850,1853],{"class":91,"line":218},[89,1851,1852],{"class":493},"    return",[89,1854,1855],{"class":542}," server;\n",[89,1857,1858],{"class":91,"line":239},[89,1859,1860],{"class":542},"  },\n",[89,1862,1863],{"class":91,"line":254},[89,1864,1865],{"class":542},"});\n",[89,1867,1868],{"class":91,"line":269},[89,1869,194],{"emptyLinePlaceholder":193},[89,1871,1872,1875,1878,1880,1883,1885,1888,1890],{"class":91,"line":284},[89,1873,1874],{"class":542},"server ",[89,1876,1877],{"class":493},"=",[89,1879,227],{"class":95},[89,1881,1882],{"class":542},"({ fetch: loaded.fetch",[89,1884,1556],{"class":493},[89,1886,1887],{"class":542},", port: ",[89,1889,689],{"class":142},[89,1891,1505],{"class":542},[67,1893,1894,1895,1898,1899,1902],{},"Anything the entry exports alongside its handler is on ",[71,1896,1897],{},"loaded.module",", so you can read its ",[1041,1900,1901],{"href":38},"server options"," and merge them with your own.",[67,1904,1905,1906,1909,1910,1913],{},"If the entry instead calls ",[71,1907,1908],{},"http.createServer(handler).listen()",", the loader captures ",[71,1911,1912],{},"handler"," and lets the entry run to completion without binding a port. Its listen callback still fires, so setup code that runs after listen is not skipped.",[67,1915,1916,1917,1920,1921,1924,1925,1927],{},"Pass ",[71,1918,1919],{},"interceptHttpListen: false"," to opt out. Note that this disables ",[1319,1922,1923],{},"both"," interceptions — an entry that calls ",[71,1926,1724],{}," will then really start listening on import.",[1342,1929,1930],{},[67,1931,1932,1933,1936],{},"\nEntries are intercepted one at a time — concurrent ",[71,1934,1935],{},"loadServerEntry"," calls are queued rather than run in parallel.",[1606,1938,1940],{"id":1939},"reloading-an-entry","Reloading an entry",[67,1942,1943,1944,1947,1948,1951,1952,1954,1955,1958,1959,1963],{},"The handler of an intercepted entry comes from a ",[1319,1945,1946],{},"side effect"," of the import, and ",[71,1949,1950],{},"import()"," caches modules per URL. Loading the same entry twice in one process returns the cached module without re-running it, so the interception never fires and ",[71,1953,1599],{}," comes back ",[71,1956,1957],{},"undefined",". Entries that ",[1960,1961,1962],"em",{},"export"," a handler are unaffected — their handler lives on the cached module.",[67,1965,1966],{},"If you need to load an entry more than once (a watch mode, for example), give each load a unique entry URL:",[79,1968,1970],{"className":1440,"code":1969,"language":1442,"meta":85,"style":85},"import { pathToFileURL } from \"node:url\";\n\nconst url = pathToFileURL(resolve(\"./server.ts\")).href;\nconst loaded = await loadServerEntry({ entry: `${url}?t=${Date.now()}` });\n",[71,1971,1972,1986,1990,2014],{"__ignoreMap":85},[89,1973,1974,1976,1979,1981,1984],{"class":91,"line":92},[89,1975,1449],{"class":493},[89,1977,1978],{"class":542}," { pathToFileURL } ",[89,1980,1455],{"class":493},[89,1982,1983],{"class":99}," \"node:url\"",[89,1985,1461],{"class":542},[89,1987,1988],{"class":91,"line":190},[89,1989,194],{"emptyLinePlaceholder":193},[89,1991,1992,1994,1997,1999,2002,2004,2007,2009,2011],{"class":91,"line":197},[89,1993,1484],{"class":493},[89,1995,1996],{"class":142}," url",[89,1998,1490],{"class":493},[89,2000,2001],{"class":95}," pathToFileURL",[89,2003,1531],{"class":542},[89,2005,2006],{"class":95},"resolve",[89,2008,1531],{"class":542},[89,2010,1502],{"class":99},[89,2012,2013],{"class":542},")).href;\n",[89,2015,2016,2018,2020,2022,2024,2026,2028,2031,2034,2037,2040,2042,2045,2048,2051],{"class":91,"line":206},[89,2017,1484],{"class":493},[89,2019,1487],{"class":142},[89,2021,1490],{"class":493},[89,2023,1493],{"class":493},[89,2025,1496],{"class":95},[89,2027,1499],{"class":542},[89,2029,2030],{"class":99},"`${",[89,2032,2033],{"class":542},"url",[89,2035,2036],{"class":99},"}?t=${",[89,2038,2039],{"class":542},"Date",[89,2041,1690],{"class":99},[89,2043,2044],{"class":95},"now",[89,2046,2047],{"class":99},"()",[89,2049,2050],{"class":99},"}`",[89,2052,1505],{"class":542},[67,2054,2055,2056,1690],{},"The query is ignored when checking that the file exists, and is preserved in the returned ",[71,2057,2033],{},[1342,2059,2060],{},[67,2061,2062,2063,2066],{},"\nEach reload leaves the previous module in the ESM cache for the lifetime of the process. For a long-running watch mode, restart a child process instead and let the runtime's own ",[71,2064,2065],{},"--watch"," handle reloads.",[1606,2068,2070],{"id":2069},"loadoptions",[71,2071,2072],{},"LoadOptions",[2074,2075,2076,2092,2105,2125,2137,2147,2166],"ul",{},[2077,2078,2079,2083,2084,2086,2087,2091],"li",{},[1319,2080,2081],{},[71,2082,1615],{}," — Path or ",[71,2085,1623],{}," URL of the server entry file. If omitted, the ",[1041,2088,2090],{"href":2089},"#entry-resolution","default entries"," are searched.",[2077,2093,2094,2098,2099,2101,2102,1690],{},[1319,2095,2096],{},[71,2097,1619],{}," — Base directory for resolving ",[71,2100,1615],{}," and for auto-discovery. Default is ",[71,2103,2104],{},"\".\"",[2077,2106,2107,2111,2112,2115,2116,2118,2119,2121,2122,1690],{},[1319,2108,2109],{},[71,2110,1741],{}," — Set to ",[71,2113,2114],{},"false"," to disable upgrading a legacy Node.js ",[71,2117,1745],{}," handler. The result then has no ",[71,2120,1599],{}," when the entry only exports a Node.js handler. Default is ",[71,2123,2124],{},"true",[2077,2126,2127,2111,2132,2134,2135,1690],{},[1319,2128,2129],{},[71,2130,2131],{},"interceptHttpListen",[71,2133,2114],{}," to import the entry without intercepting listen calls. Default is ",[71,2136,2124],{},[2077,2138,2139,2143,2144,2146],{},[1319,2140,2141],{},[71,2142,1775],{}," — The srvx server instance to hand to the entry when its ",[71,2145,1724],{}," call is intercepted. Define it as a getter when the instance is created after loading.",[2077,2148,2149,2154,2155,2158,2159,2162,2163,2165],{},[1319,2150,2151],{},[71,2152,2153],{},"nodeServer"," — The ",[71,2156,2157],{},"node:http"," server instance to return from an intercepted ",[71,2160,2161],{},"listen()",". Defaults to ",[71,2164,1775],{},"'s underlying Node.js server, or a stub that forwards to it once it exists.",[2077,2167,2168,2173],{},[1319,2169,2170],{},[71,2171,2172],{},"onLoad"," — Hook called with the imported module before the handler is resolved. Return a value to replace the module.",[1606,2175,2177],{"id":2176},"loadedserverentry",[71,2178,2179],{},"LoadedServerEntry",[2074,2181,2182,2192,2199,2209,2226,2241],{},[2077,2183,2184,2188,2189,2191],{},[1319,2185,2186],{},[71,2187,1599],{}," — The resolved web fetch handler, or ",[71,2190,1957],{}," if the entry exports none.",[2077,2193,2194,2198],{},[1319,2195,2196],{},[71,2197,1689],{}," — The raw imported module. Use it to read options the entry exports next to its handler.",[2077,2200,2201,2205,2206,2208],{},[1319,2202,2203],{},[71,2204,2033],{}," — The resolved ",[71,2207,1623],{}," URL of the loaded entry.",[2077,2210,2211,2215,2216,2218,2219,1675,2221,2223,2224,1690],{},[1319,2212,2213],{},[71,2214,1603],{}," — ",[71,2217,2124],{}," when no entry file could be located. ",[71,2220,1599],{},[71,2222,1689],{}," are then ",[71,2225,1957],{},[2077,2227,2228,2215,2232,2234,2235,2237,2238,1690],{},[1319,2229,2230],{},[71,2231,1741],{},[71,2233,2124],{}," when the handler was upgraded from a legacy Node.js ",[71,2236,1745],{}," handler. Serve it with ",[71,2239,2240],{},"srvx/node",[2077,2242,2243,2247,2248,2250],{},[1319,2244,2245],{},[71,2246,1775],{}," — The server instance the entry created via ",[71,2249,1724],{},", if that call was intercepted.",[1606,2252,2254],{"id":2253},"typescript-entries","TypeScript entries",[67,2256,2257,2258,2260],{},"The loader imports entries with a plain dynamic ",[71,2259,1950],{},", so TypeScript support comes from the runtime:",[2074,2262,2263,2275,2282],{},[2077,2264,2265,2268,2269,2271,2272,1690],{},[1319,2266,2267],{},"Node.js"," — requires v22.18+ or v24+ for ",[71,2270,1645],{}," entries. The loader throws a targeted error on older versions rather than a raw ",[71,2273,2274],{},"ERR_UNKNOWN_FILE_EXTENSION",[2077,2276,2277,1675,2279,2281],{},[1319,2278,132],{},[1319,2280,150],{}," — supported natively.",[2077,2283,2284,2287,2288,2294,2295,2300],{},[1319,2285,2286],{},"JSX"," — needs a loader such as ",[1041,2289,2293],{"href":2290,"rel":2291},"https://github.com/unjs/jiti",[2292],"nofollow","jiti",", preloaded with the ",[1041,2296,2298],{"href":2297},"#usage",[71,2299,1349],{}," flag.",[2302,2303,2304],"style",{},"html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}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 .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}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}",{"title":85,"searchDepth":190,"depth":190,"links":2306},[2307,2308,2309,2310,2311,2312],{"id":166,"depth":190,"text":167},{"id":1262,"depth":190,"text":1263},{"id":1313,"depth":190,"text":1314},{"id":1339,"depth":190,"text":1340},{"id":1367,"depth":190,"text":1368},{"id":1429,"depth":190,"text":1430,"children":2313},[2314,2315,2316,2317,2318,2319,2320],{"id":1608,"depth":197,"text":1609},{"id":1693,"depth":197,"text":1694},{"id":1760,"depth":197,"text":1729},{"id":1939,"depth":197,"text":1940},{"id":2069,"depth":197,"text":2072},{"id":2176,"depth":197,"text":2179},{"id":2253,"depth":197,"text":2254},"Use the srvx CLI command to easily start a development or production server.","md",{"automd":193,"icon":15},{"icon":15},{"title":12,"description":2321},"yjEyGGCp_44ykr3xT-6uElze0VB9KKfDFgVuenyQb8I",[2328,2330],{"title":5,"path":6,"stem":7,"description":2329,"icon":10,"children":-1},"Build HTTP servers with web standard APIs like fetch, Request, and Response.",{"title":17,"path":18,"stem":19,"description":2331,"icon":20,"children":-1},"Reusable, runtime-agnostic helpers for enforcing request body size limits.",1784719519561]