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