[{"data":1,"prerenderedAt":881},["ShallowReactive",2],{"navigation_docs":3,"-platforms-vercel":195,"-platforms-vercel-surround":876},[4,27,61,75,100,126,147,177],{"title":5,"icon":6,"redirect":7,"path":8,"stem":9,"children":10,"page":26},"Introduction","icon-park-outline:home","/introduction/about-mion","/introduction","1.introduction",[11,14,18,22],{"title":12,"path":7,"stem":13},"About mion","1.introduction/1.about-mion",{"title":15,"path":16,"stem":17},"Quick Start","/introduction/quick-start","1.introduction/2.quick-start",{"title":19,"path":20,"stem":21},"Manual Install","/introduction/manual-install","1.introduction/3.manual-install",{"title":23,"path":24,"stem":25},"What's Next","/introduction/what-is-next","1.introduction/4.what-is-next",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Server","icon-park-outline:server","/server","20.server",[33,37,41,45,49,53,57],{"title":34,"path":35,"stem":36},"Router Overview","/server/overview","20.server/0.overview",{"title":38,"path":39,"stem":40},"Routes","/server/routes","20.server/1.routes",{"title":42,"path":43,"stem":44},"Middleware","/server/middle-fns","20.server/2.middle-fns",{"title":46,"path":47,"stem":48},"Request & Response","/server/request-and-response","20.server/5.request-and-response",{"title":50,"path":51,"stem":52},"Error Handling","/server/error-handling","20.server/6.error-handling",{"title":54,"path":55,"stem":56},"Validation","/server/validation","20.server/7.validation",{"title":58,"path":59,"stem":60},"Serialization","/server/serialization","20.server/8.serialization",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":26},"Drizzle ORM","i-lineicons-drizzle","/drizzle-orm","21.drizzle-orm",[67,71],{"title":68,"path":69,"stem":70},"Drizzle Overview","/drizzle-orm/drizzle-overview","21.drizzle-orm/0.drizzle-overview",{"title":72,"path":73,"stem":74},"Column Mapping","/drizzle-orm/column-mapping","21.drizzle-orm/1.column-mapping",{"title":76,"icon":77,"path":78,"stem":79,"children":80,"page":26},"Client","icon-park-outline:computer","/client","3.client",[81,85,88,92,96],{"title":82,"path":83,"stem":84},"Client Overview","/client/client-overview","3.client/0.client-overview",{"title":50,"path":86,"stem":87},"/client/error-handling","3.client/1.error-handling",{"title":89,"path":90,"stem":91},"Validation Errors","/client/validation-errors","3.client/2.validation-errors",{"title":93,"path":94,"stem":95},"Routes Flow","/client/client-flow","3.client/3.client-flow",{"title":97,"path":98,"stem":99},"Cancellation & Timeouts","/client/cancellation-timeouts","3.client/4.cancellation-timeouts",{"title":101,"icon":102,"redirect":103,"path":104,"stem":105,"children":106,"page":26},"RunTypes","i-lucide-scan-text","/run-types/overview","/run-types","4.run-types",[107,110,114,118,122],{"title":108,"path":103,"stem":109},"RunTypes Overview","4.run-types/0.overview",{"title":111,"path":112,"stem":113},"Supported Types","/run-types/features","4.run-types/1.features",{"title":115,"path":116,"stem":117},"Type Formats","/run-types/type-formats","4.run-types/2.type-formats",{"title":119,"path":120,"stem":121},"Built-in Formats","/run-types/built-in-formats","4.run-types/3.built-in-formats",{"title":123,"path":124,"stem":125},"Caveats","/run-types/caveats","4.run-types/4.caveats",{"title":127,"path":128,"stem":129,"children":130,"page":26},"Devtools","/devtools","5.devtools",[131,135,139,143],{"title":132,"path":133,"stem":134},"AOT Compilation","/devtools/aot-compilation","5.devtools/0.aot-compilation",{"title":136,"path":137,"stem":138},"Pure Functions","/devtools/pure-functions","5.devtools/1.pure-functions",{"title":140,"path":141,"stem":142},"ESLint Rules","/devtools/eslint-rules","5.devtools/2.eslint-rules",{"title":144,"path":145,"stem":146},"Vite Configuration","/devtools/vite-config","5.devtools/3.vite-config",{"title":148,"redirect":149,"icon":150,"path":151,"stem":152,"children":153,"page":26},"Platforms","/platforms/node-js","icon-park-outline:play","/platforms","6.platforms",[154,157,161,165,169,173],{"title":155,"path":149,"stem":156},"Node.js","6.platforms/1.node-js",{"title":158,"path":159,"stem":160},"Bun","/platforms/bun","6.platforms/2.bun",{"title":162,"path":163,"stem":164},"AWS Lambda","/platforms/aws-lambda","6.platforms/3.aws-lambda",{"title":166,"path":167,"stem":168},"Google Cloud Functions","/platforms/google-cloud-functions","6.platforms/4.google-cloud-functions",{"title":170,"path":171,"stem":172},"Cloudflare Workers","/platforms/cloudflare","6.platforms/5.cloudflare",{"title":174,"path":175,"stem":176},"Vercel","/platforms/vercel","6.platforms/6.vercel",{"title":178,"icon":179,"redirect":180,"path":181,"stem":182,"children":183,"page":26},"Benchmarks","icon-park-outline:chart-line","/benchmarks/hello-world","/benchmarks","7.benchmarks",[184,187,191],{"title":185,"path":180,"stem":186},"Hello World","7.benchmarks/1.hello-world",{"title":188,"path":189,"stem":190},"Light Validation","/benchmarks/light-validation","7.benchmarks/2.light-validation",{"title":192,"path":193,"stem":194},"Heavy Validation","/benchmarks/heavy-validation","7.benchmarks/3.heavy-validation",{"id":196,"title":174,"body":197,"description":870,"extension":871,"links":872,"meta":873,"navigation":356,"path":175,"seo":874,"stem":176,"__hash__":875},"docs/6.platforms/6.vercel.md",{"type":198,"value":199},"minimark",[200,227,232,260,263,566,570,573,581,600,604,609,796,804,807,811,816,866],[201,202,203,204,208,209,212,213,212,216,212,219,222,223,226],"p",{},"mion can run on Vercel as a set of Next.js App Router route handlers. The ",[205,206,207],"code",{},"@mionjs/platform-vercel"," package returns an object with ",[205,210,211],{},"GET",", ",[205,214,215],{},"POST",[205,217,218],{},"PUT",[205,220,221],{},"DELETE",", and ",[205,224,225],{},"PATCH"," exports that you re-export from a catch-all route file.",[228,229,231],"h2",{"id":230},"installation","Installation",[233,234,239],"pre",{"className":235,"code":236,"language":237,"meta":238,"style":238},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @mionjs/platform-vercel @mionjs/router\n","bash","",[205,240,241],{"__ignoreMap":238},[242,243,246,250,254,257],"span",{"class":244,"line":245},"line",1,[242,247,249],{"class":248},"sBMFI","npm",[242,251,253],{"class":252},"sfazB"," install",[242,255,256],{"class":252}," @mionjs/platform-vercel",[242,258,259],{"class":252}," @mionjs/router\n",[228,261,15],{"id":262},"quick-start",[264,265,266,426],"code-group",{},[233,267,272],{"className":268,"code":269,"filename":270,"language":271,"meta":238,"style":238},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {createVercelHandler} from '@mionjs/platform-vercel';\nimport {initMionRouter} from '@mionjs/router';\nimport {routes} from './vercel-routes.ts';\n\nawait initMionRouter(routes);\n\nexport const {GET, POST, PUT, DELETE, PATCH} = createVercelHandler();\n","app/api/[...mion]/route.ts","ts",[205,273,274,305,328,351,358,373,378],{"__ignoreMap":238},[242,275,276,280,284,288,291,294,297,299,302],{"class":244,"line":245},[242,277,279],{"class":278},"s7zQu","import",[242,281,283],{"class":282},"sMK4o"," {",[242,285,287],{"class":286},"sTEyZ","createVercelHandler",[242,289,290],{"class":282},"}",[242,292,293],{"class":278}," from",[242,295,296],{"class":282}," '",[242,298,207],{"class":252},[242,300,301],{"class":282},"'",[242,303,304],{"class":282},";\n",[242,306,308,310,312,315,317,319,321,324,326],{"class":244,"line":307},2,[242,309,279],{"class":278},[242,311,283],{"class":282},[242,313,314],{"class":286},"initMionRouter",[242,316,290],{"class":282},[242,318,293],{"class":278},[242,320,296],{"class":282},[242,322,323],{"class":252},"@mionjs/router",[242,325,301],{"class":282},[242,327,304],{"class":282},[242,329,331,333,335,338,340,342,344,347,349],{"class":244,"line":330},3,[242,332,279],{"class":278},[242,334,283],{"class":282},[242,336,337],{"class":286},"routes",[242,339,290],{"class":282},[242,341,293],{"class":278},[242,343,296],{"class":282},[242,345,346],{"class":252},"./vercel-routes.ts",[242,348,301],{"class":282},[242,350,304],{"class":282},[242,352,354],{"class":244,"line":353},4,[242,355,357],{"emptyLinePlaceholder":356},true,"\n",[242,359,361,364,368,371],{"class":244,"line":360},5,[242,362,363],{"class":278},"await",[242,365,367],{"class":366},"s2Zo4"," initMionRouter",[242,369,370],{"class":286},"(routes)",[242,372,304],{"class":282},[242,374,376],{"class":244,"line":375},6,[242,377,357],{"emptyLinePlaceholder":356},[242,379,381,384,388,390,392,395,398,400,403,405,408,410,413,415,418,421,424],{"class":244,"line":380},7,[242,382,383],{"class":278},"export",[242,385,387],{"class":386},"spNyl"," const",[242,389,283],{"class":282},[242,391,211],{"class":286},[242,393,394],{"class":282},",",[242,396,397],{"class":286}," POST",[242,399,394],{"class":282},[242,401,402],{"class":286}," PUT",[242,404,394],{"class":282},[242,406,407],{"class":286}," DELETE",[242,409,394],{"class":282},[242,411,412],{"class":286}," PATCH",[242,414,290],{"class":282},[242,416,417],{"class":282}," =",[242,419,420],{"class":366}," createVercelHandler",[242,422,423],{"class":286},"()",[242,425,304],{"class":282},[233,427,430],{"className":268,"code":428,"filename":429,"language":271,"meta":238,"style":238},"import {Routes, route} from '@mionjs/router';\n\nexport const routes = {\n    sayHello: route((ctx, name: string): string => {\n        return `Hello ${name}!`;\n    }),\n} satisfies Routes;\n","src/routes.ts",[205,431,432,457,461,476,516,543,554],{"__ignoreMap":238},[242,433,434,436,438,440,442,445,447,449,451,453,455],{"class":244,"line":245},[242,435,279],{"class":278},[242,437,283],{"class":282},[242,439,38],{"class":286},[242,441,394],{"class":282},[242,443,444],{"class":286}," route",[242,446,290],{"class":282},[242,448,293],{"class":278},[242,450,296],{"class":282},[242,452,323],{"class":252},[242,454,301],{"class":282},[242,456,304],{"class":282},[242,458,459],{"class":244,"line":307},[242,460,357],{"emptyLinePlaceholder":356},[242,462,463,465,467,470,473],{"class":244,"line":330},[242,464,383],{"class":278},[242,466,387],{"class":386},[242,468,469],{"class":286}," routes ",[242,471,472],{"class":282},"=",[242,474,475],{"class":282}," {\n",[242,477,478,482,485,487,490,492,496,498,501,503,506,509,511,514],{"class":244,"line":353},[242,479,481],{"class":480},"swJcz","    sayHello",[242,483,484],{"class":282},":",[242,486,444],{"class":366},[242,488,489],{"class":286},"(",[242,491,489],{"class":282},[242,493,495],{"class":494},"sHdIc","ctx",[242,497,394],{"class":282},[242,499,500],{"class":494}," name",[242,502,484],{"class":282},[242,504,505],{"class":248}," string",[242,507,508],{"class":282},"):",[242,510,505],{"class":248},[242,512,513],{"class":386}," =>",[242,515,475],{"class":282},[242,517,518,521,524,527,530,533,535,538,541],{"class":244,"line":360},[242,519,520],{"class":278},"        return",[242,522,523],{"class":282}," `",[242,525,526],{"class":252},"Hello ",[242,528,529],{"class":282},"${",[242,531,532],{"class":286},"name",[242,534,290],{"class":282},[242,536,537],{"class":252},"!",[242,539,540],{"class":282},"`",[242,542,304],{"class":282},[242,544,545,548,551],{"class":244,"line":375},[242,546,547],{"class":282},"    }",[242,549,550],{"class":286},")",[242,552,553],{"class":282},",\n",[242,555,556,558,561,564],{"class":244,"line":380},[242,557,290],{"class":282},[242,559,560],{"class":278}," satisfies",[242,562,563],{"class":248}," Routes",[242,565,304],{"class":282},[228,567,569],{"id":568},"catch-all-route","Catch-all Route",[201,571,572],{},"mion uses a single route file that handles every method. Place your handler in a Next.js App Router catch-all directory:",[233,574,579],{"className":575,"code":577,"language":578},[576],"language-text","app/\n  api/\n    [...mion]/\n      route.ts   ← exports GET/POST/PUT/DELETE/PATCH from createVercelHandler()\n","text",[205,580,577],{"__ignoreMap":238},[201,582,583,584,587,588,591,592,595,596,599],{},"The ",[205,585,586],{},"[...mion]"," segment captures every path under ",[205,589,590],{},"/api/",", allowing mion's router to dispatch requests to the correct route handler regardless of the URL. Make sure your client ",[205,593,594],{},"baseUrl"," points to ",[205,597,598],{},"/api",".",[228,601,603],{"id":602},"configuration","Configuration",[201,605,606,607,484],{},"You can pass configuration options to ",[205,608,287],{},[233,610,612],{"className":268,"code":611,"language":271,"meta":238,"style":238},"import {createVercelHandler} from '@mionjs/platform-vercel';\nimport {initMionRouter} from '@mionjs/router';\nimport {routes} from './vercel-routes.ts';\n\nawait initMionRouter(routes, {\n    basePath: 'api',\n});\n\nexport const {GET, POST, PUT, DELETE, PATCH} = createVercelHandler({\n    defaultResponseHeaders: {'access-control-allow-origin': '*'},\n});\n",[205,613,614,634,654,674,678,691,707,715,720,758,787],{"__ignoreMap":238},[242,615,616,618,620,622,624,626,628,630,632],{"class":244,"line":245},[242,617,279],{"class":278},[242,619,283],{"class":282},[242,621,287],{"class":286},[242,623,290],{"class":282},[242,625,293],{"class":278},[242,627,296],{"class":282},[242,629,207],{"class":252},[242,631,301],{"class":282},[242,633,304],{"class":282},[242,635,636,638,640,642,644,646,648,650,652],{"class":244,"line":307},[242,637,279],{"class":278},[242,639,283],{"class":282},[242,641,314],{"class":286},[242,643,290],{"class":282},[242,645,293],{"class":278},[242,647,296],{"class":282},[242,649,323],{"class":252},[242,651,301],{"class":282},[242,653,304],{"class":282},[242,655,656,658,660,662,664,666,668,670,672],{"class":244,"line":330},[242,657,279],{"class":278},[242,659,283],{"class":282},[242,661,337],{"class":286},[242,663,290],{"class":282},[242,665,293],{"class":278},[242,667,296],{"class":282},[242,669,346],{"class":252},[242,671,301],{"class":282},[242,673,304],{"class":282},[242,675,676],{"class":244,"line":353},[242,677,357],{"emptyLinePlaceholder":356},[242,679,680,682,684,687,689],{"class":244,"line":360},[242,681,363],{"class":278},[242,683,367],{"class":366},[242,685,686],{"class":286},"(routes",[242,688,394],{"class":282},[242,690,475],{"class":282},[242,692,693,696,698,700,703,705],{"class":244,"line":375},[242,694,695],{"class":480},"    basePath",[242,697,484],{"class":282},[242,699,296],{"class":282},[242,701,702],{"class":252},"api",[242,704,301],{"class":282},[242,706,553],{"class":282},[242,708,709,711,713],{"class":244,"line":380},[242,710,290],{"class":282},[242,712,550],{"class":286},[242,714,304],{"class":282},[242,716,718],{"class":244,"line":717},8,[242,719,357],{"emptyLinePlaceholder":356},[242,721,723,725,727,729,731,733,735,737,739,741,743,745,747,749,751,753,755],{"class":244,"line":722},9,[242,724,383],{"class":278},[242,726,387],{"class":386},[242,728,283],{"class":282},[242,730,211],{"class":286},[242,732,394],{"class":282},[242,734,397],{"class":286},[242,736,394],{"class":282},[242,738,402],{"class":286},[242,740,394],{"class":282},[242,742,407],{"class":286},[242,744,394],{"class":282},[242,746,412],{"class":286},[242,748,290],{"class":282},[242,750,417],{"class":282},[242,752,420],{"class":366},[242,754,489],{"class":286},[242,756,757],{"class":282},"{\n",[242,759,761,764,766,768,770,773,775,777,779,782,784],{"class":244,"line":760},10,[242,762,763],{"class":480},"    defaultResponseHeaders",[242,765,484],{"class":282},[242,767,283],{"class":282},[242,769,301],{"class":282},[242,771,772],{"class":480},"access-control-allow-origin",[242,774,301],{"class":282},[242,776,484],{"class":282},[242,778,296],{"class":282},[242,780,781],{"class":252},"*",[242,783,301],{"class":282},[242,785,786],{"class":282},"},\n",[242,788,790,792,794],{"class":244,"line":789},11,[242,791,290],{"class":282},[242,793,550],{"class":286},[242,795,304],{"class":282},[797,798,799,800,803],"tip",{},"Vercel also supports running mion on the Edge runtime. The handler is built on the Web standard ",[205,801,802],{},"Request -> Response"," API and works in both Node.js and Edge environments without changes.",[805,806],"spacer",{},[228,808,810],{"id":809},"type-reference","Type Reference",[812,813,815],"h3",{"id":814},"vercelhandleroptions","VercelHandlerOptions",[233,817,819],{"className":268,"code":818,"language":271,"meta":238,"style":238},"export interface VercelHandlerOptions {\n    /** Set of default response headers to add to every response */\n    defaultResponseHeaders: Record\u003Cstring, string>;\n}\n",[205,820,821,833,839,861],{"__ignoreMap":238},[242,822,823,825,828,831],{"class":244,"line":245},[242,824,383],{"class":278},[242,826,827],{"class":386}," interface",[242,829,830],{"class":248}," VercelHandlerOptions",[242,832,475],{"class":282},[242,834,835],{"class":244,"line":307},[242,836,838],{"class":837},"sHwdD","    /** Set of default response headers to add to every response */\n",[242,840,841,843,845,848,851,854,856,858],{"class":244,"line":330},[242,842,763],{"class":480},[242,844,484],{"class":282},[242,846,847],{"class":248}," Record",[242,849,850],{"class":282},"\u003C",[242,852,853],{"class":248},"string",[242,855,394],{"class":282},[242,857,505],{"class":248},[242,859,860],{"class":282},">;\n",[242,862,863],{"class":244,"line":353},[242,864,865],{"class":282},"}\n",[867,868,869],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}","Running mion APIs on Vercel using Next.js App Router route handlers.","md",null,{"toc":26},{"title":174,"description":870},"3JxIDvy9RFMArDV8BFtn8fu2oGAbrFXmuSbbfoB8jAA",[877,879],{"title":170,"path":171,"stem":172,"description":878,"children":-1},"Running mion APIs on Cloudflare Workers using the Web standard fetch handler.",{"title":185,"path":180,"stem":186,"description":880,"children":-1},"Performance benchmarks for a simple Hello World endpoint.",1777152482296]