[{"data":1,"prerenderedAt":2020},["ShallowReactive",2],{"navigation_docs":3,"-rpc-introduction-manual-install":399},[4,162,346],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":24},"RPC","icon-park-outline:lightning","\u002Frpc","01.rpc",[10,25,63,77,102,136],{"title":11,"icon":12,"redirect":7,"path":13,"stem":14,"children":15,"page":24},"Introduction","icon-park-outline:home","\u002Frpc\u002Fintroduction","01.rpc\u002F01.introduction",[16,20],{"title":17,"path":18,"stem":19},"Quick Start","\u002Frpc\u002Fintroduction\u002Fquick-start","01.rpc\u002F01.introduction\u002F02.quick-start",{"title":21,"path":22,"stem":23},"Manual Install","\u002Frpc\u002Fintroduction\u002Fmanual-install","01.rpc\u002F01.introduction\u002F03.manual-install",false,{"title":26,"icon":27,"path":28,"stem":29,"children":30,"page":24},"Server","icon-park-outline:server","\u002Frpc\u002Fserver","01.rpc\u002F02.server",[31,35,39,43,47,51,55,59],{"title":32,"path":33,"stem":34},"Routes","\u002Frpc\u002Fserver\u002Froutes","01.rpc\u002F02.server\u002F01.routes",{"title":36,"path":37,"stem":38},"Middleware","\u002Frpc\u002Fserver\u002Fmiddleware","01.rpc\u002F02.server\u002F02.middleware",{"title":40,"path":41,"stem":42},"Call Context","\u002Frpc\u002Fserver\u002Fcall-context","01.rpc\u002F02.server\u002F03.call-context",{"title":44,"path":45,"stem":46},"Headers","\u002Frpc\u002Fserver\u002Fheaders","01.rpc\u002F02.server\u002F04.headers",{"title":48,"path":49,"stem":50},"Error Handling","\u002Frpc\u002Fserver\u002Ferror-handling","01.rpc\u002F02.server\u002F05.error-handling",{"title":52,"path":53,"stem":54},"Validation","\u002Frpc\u002Fserver\u002Fvalidation","01.rpc\u002F02.server\u002F06.validation",{"title":56,"path":57,"stem":58},"JSON Round Trip","\u002Frpc\u002Fserver\u002Fjson-round-trip","01.rpc\u002F02.server\u002F07.json-round-trip",{"title":60,"path":61,"stem":62},"Drizzle Tables","\u002Frpc\u002Fserver\u002Fdrizzle-tables","01.rpc\u002F02.server\u002F08.drizzle-tables",{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":24},"Middlewares","icon-park-outline:link-one","\u002Frpc\u002Fmiddlewares","01.rpc\u002F03.middlewares",[69,73],{"title":70,"path":71,"stem":72},"fetchMetadata","\u002Frpc\u002Fmiddlewares\u002Ffetch-metadata","01.rpc\u002F03.middlewares\u002F01.fetch-metadata",{"title":74,"path":75,"stem":76},"syncRoutes","\u002Frpc\u002Fmiddlewares\u002Fsync-routes","01.rpc\u002F03.middlewares\u002F02.sync-routes",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":24},"Client","icon-park-outline:computer","\u002Frpc\u002Fclient","01.rpc\u002F04.client",[83,87,91,94,98],{"title":84,"path":85,"stem":86},"Client Overview","\u002Frpc\u002Fclient\u002Fclient-overview","01.rpc\u002F04.client\u002F00.client-overview",{"title":88,"path":89,"stem":90},"Client Middleware","\u002Frpc\u002Fclient\u002Fclient-middleware","01.rpc\u002F04.client\u002F01.client-middleware",{"title":48,"path":92,"stem":93},"\u002Frpc\u002Fclient\u002Ferror-handling","01.rpc\u002F04.client\u002F02.error-handling",{"title":95,"path":96,"stem":97},"Batch Requests","\u002Frpc\u002Fclient\u002Fbatch","01.rpc\u002F04.client\u002F03.batch",{"title":99,"path":100,"stem":101},"Cancellation & Timeouts","\u002Frpc\u002Fclient\u002Fcancellation-timeouts","01.rpc\u002F04.client\u002F04.cancellation-timeouts",{"title":103,"redirect":104,"icon":105,"path":106,"stem":107,"children":108,"page":24},"Platforms","\u002Frpc\u002Fplatforms\u002Fnode-js","icon-park-outline:play","\u002Frpc\u002Fplatforms","01.rpc\u002F06.platforms",[109,112,116,120,124,128,132],{"title":110,"path":104,"stem":111},"Node.js","01.rpc\u002F06.platforms\u002F01.node-js",{"title":113,"path":114,"stem":115},"Bun","\u002Frpc\u002Fplatforms\u002Fbun","01.rpc\u002F06.platforms\u002F02.bun",{"title":117,"path":118,"stem":119},"AWS Lambda","\u002Frpc\u002Fplatforms\u002Faws-lambda","01.rpc\u002F06.platforms\u002F03.aws-lambda",{"title":121,"path":122,"stem":123},"Google Cloud Functions","\u002Frpc\u002Fplatforms\u002Fgoogle-cloud-functions","01.rpc\u002F06.platforms\u002F04.google-cloud-functions",{"title":125,"path":126,"stem":127},"Cloudflare Workers","\u002Frpc\u002Fplatforms\u002Fcloudflare","01.rpc\u002F06.platforms\u002F05.cloudflare",{"title":129,"path":130,"stem":131},"Vercel","\u002Frpc\u002Fplatforms\u002Fvercel","01.rpc\u002F06.platforms\u002F06.vercel",{"title":133,"path":134,"stem":135},"uWebSockets.js","\u002Frpc\u002Fplatforms\u002Fuwebsockets","01.rpc\u002F06.platforms\u002F07.uwebsockets",{"title":137,"icon":138,"path":139,"stem":140,"children":141,"page":24},"Devtools","icon-park-outline:tool","\u002Frpc\u002Fdevtools","01.rpc\u002F07.devtools",[142,146,150,154,158],{"title":143,"path":144,"stem":145},"Linter","\u002Frpc\u002Fdevtools\u002Flinter","01.rpc\u002F07.devtools\u002F01.linter",{"title":147,"path":148,"stem":149},"Vite","\u002Frpc\u002Fdevtools\u002Fvite","01.rpc\u002F07.devtools\u002F02.vite",{"title":151,"path":152,"stem":153},"Next.js","\u002Frpc\u002Fdevtools\u002Fnextjs","01.rpc\u002F07.devtools\u002F03.nextjs",{"title":155,"path":156,"stem":157},"CLI","\u002Frpc\u002Fdevtools\u002Fcli","01.rpc\u002F07.devtools\u002F04.cli",{"title":159,"path":160,"stem":161},"API Types","\u002Frpc\u002Fdevtools\u002Fapi-types","01.rpc\u002F07.devtools\u002F05.api-types",{"title":163,"icon":164,"path":165,"stem":166,"children":167,"page":24},"RunTypes","i-lucide-braces","\u002Fruntypes","02.runtypes",[168,184,224,254,268,290,332],{"title":11,"icon":169,"redirect":165,"path":170,"stem":171,"children":172,"page":24},"i-lucide-rocket","\u002Fruntypes\u002Fintroduction","02.runtypes\u002F01.introduction",[173,177,180],{"title":174,"path":175,"stem":176},"Built on typescript-go","\u002Fruntypes\u002Fintroduction\u002Fbuilt-on-typescript-go","02.runtypes\u002F01.introduction\u002F02.built-on-typescript-go",{"title":17,"path":178,"stem":179},"\u002Fruntypes\u002Fintroduction\u002Fquick-start","02.runtypes\u002F01.introduction\u002F03.quick-start",{"title":181,"path":182,"stem":183},"Configuration","\u002Fruntypes\u002Fintroduction\u002Fconfiguration","02.runtypes\u002F01.introduction\u002F04.configuration",{"title":185,"icon":186,"redirect":187,"path":188,"stem":189,"children":190,"page":24},"Guide","i-lucide-book-open","\u002Fruntypes\u002Fguide\u002Ftype-builders","\u002Fruntypes\u002Fguide","02.runtypes\u002F02.guide",[191,194,198,201,204,208,212,216,220],{"title":192,"path":187,"stem":193},"Types vs Type Builders","02.runtypes\u002F02.guide\u002F01.type-builders",{"title":195,"path":196,"stem":197},"Reflection","\u002Fruntypes\u002Fguide\u002Freflection","02.runtypes\u002F02.guide\u002F02.reflection",{"title":52,"path":199,"stem":200},"\u002Fruntypes\u002Fguide\u002Fvalidation","02.runtypes\u002F02.guide\u002F03.validation",{"title":56,"path":202,"stem":203},"\u002Fruntypes\u002Fguide\u002Fjson-round-trip","02.runtypes\u002F02.guide\u002F04.json-round-trip",{"title":205,"path":206,"stem":207},"Data Mocking","\u002Fruntypes\u002Fguide\u002Fmocking","02.runtypes\u002F02.guide\u002F07.mocking",{"title":209,"path":210,"stem":211},"JSON Schemas","\u002Fruntypes\u002Fguide\u002Fjson-schemas","02.runtypes\u002F02.guide\u002F08.json-schemas",{"title":213,"path":214,"stem":215},"Pure Functions","\u002Fruntypes\u002Fguide\u002Fpure-functions","02.runtypes\u002F02.guide\u002F09.pure-functions",{"title":217,"path":218,"stem":219},"Compiler Markers","\u002Fruntypes\u002Fguide\u002Fcompiler-markers","02.runtypes\u002F02.guide\u002F10.compiler-markers",{"title":221,"path":222,"stem":223},"All Compiled Functions","\u002Fruntypes\u002Fguide\u002Fall-compiled-functions","02.runtypes\u002F02.guide\u002F11.all-compiled-functions",{"title":225,"icon":226,"redirect":227,"path":228,"stem":229,"children":230,"page":24},"Type Formats","i-lucide-shapes","\u002Fruntypes\u002Ftype-formats\u002Foverview","\u002Fruntypes\u002Ftype-formats","02.runtypes\u002F03.type-formats",[231,234,238,242,246,250],{"title":232,"path":227,"stem":233},"Overview","02.runtypes\u002F03.type-formats\u002F01.overview",{"title":235,"path":236,"stem":237},"String Formats","\u002Fruntypes\u002Ftype-formats\u002Fstring","02.runtypes\u002F03.type-formats\u002F02.string",{"title":239,"path":240,"stem":241},"Number Formats","\u002Fruntypes\u002Ftype-formats\u002Fnumber","02.runtypes\u002F03.type-formats\u002F03.number",{"title":243,"path":244,"stem":245},"BigInt Formats","\u002Fruntypes\u002Ftype-formats\u002Fbigint","02.runtypes\u002F03.type-formats\u002F04.bigint",{"title":247,"path":248,"stem":249},"Date and Time Formats","\u002Fruntypes\u002Ftype-formats\u002Fdate-time","02.runtypes\u002F03.type-formats\u002F05.date-time",{"title":251,"path":252,"stem":253},"Collection Formats","\u002Fruntypes\u002Ftype-formats\u002Fcollections","02.runtypes\u002F03.type-formats\u002F06.collections",{"title":255,"icon":256,"redirect":257,"path":258,"stem":259,"children":260,"page":24},"Tooling","i-lucide-wrench","\u002Fruntypes\u002Ftooling\u002Flinting","\u002Fruntypes\u002Ftooling","02.runtypes\u002F04.tooling",[261,264],{"title":262,"path":257,"stem":263},"Linting","02.runtypes\u002F04.tooling\u002F01.linting",{"title":265,"path":266,"stem":267},"Source Conversion","\u002Fruntypes\u002Ftooling\u002Fsource-conversion","02.runtypes\u002F04.tooling\u002F02.source-conversion",{"title":269,"icon":270,"redirect":271,"path":272,"stem":273,"children":274,"page":24},"AI Integration","i-lucide-sparkles","\u002Fruntypes\u002Fai-integration\u002Fworkflow-and-commands","\u002Fruntypes\u002Fai-integration","02.runtypes\u002F05.ai-integration",[275,278,282,286],{"title":276,"path":271,"stem":277},"AI Workflow","02.runtypes\u002F05.ai-integration\u002F01.workflow-and-commands",{"title":279,"path":280,"stem":281},"FriendlyText","\u002Fruntypes\u002Fai-integration\u002Ffriendly-text","02.runtypes\u002F05.ai-integration\u002F02.friendly-text",{"title":283,"path":284,"stem":285},"MockData","\u002Fruntypes\u002Fai-integration\u002Fmock-data","02.runtypes\u002F05.ai-integration\u002F03.mock-data",{"title":287,"path":288,"stem":289},"Translations (i18n)","\u002Fruntypes\u002Fai-integration\u002Fi18n","02.runtypes\u002F05.ai-integration\u002F04.i18n",{"title":291,"icon":292,"redirect":293,"path":294,"stem":295,"children":296,"page":24},"Drizzle ORM","i-lineicons-drizzle","\u002Fruntypes\u002Fdrizzle-orm\u002Fdrizzle-overview","\u002Fruntypes\u002Fdrizzle-orm","02.runtypes\u002F06.drizzle-orm",[297,300,304,308,312,316,320,324,328],{"title":298,"path":293,"stem":299},"Drizzle Overview","02.runtypes\u002F06.drizzle-orm\u002F00.drizzle-overview",{"title":301,"path":302,"stem":303},"Column Formats","\u002Fruntypes\u002Fdrizzle-orm\u002Fcolumn-formats","02.runtypes\u002F06.drizzle-orm\u002F01.column-formats",{"title":305,"path":306,"stem":307},"Views","\u002Fruntypes\u002Fdrizzle-orm\u002Fviews","02.runtypes\u002F06.drizzle-orm\u002F02.views",{"title":309,"path":310,"stem":311},"Indexes and Constraints","\u002Fruntypes\u002Fdrizzle-orm\u002Fconstraints","02.runtypes\u002F06.drizzle-orm\u002F03.constraints",{"title":313,"path":314,"stem":315},"Row Level Security","\u002Fruntypes\u002Fdrizzle-orm\u002Frow-level-security","02.runtypes\u002F06.drizzle-orm\u002F04.row-level-security",{"title":317,"path":318,"stem":319},"Relations","\u002Fruntypes\u002Fdrizzle-orm\u002Frelations","02.runtypes\u002F06.drizzle-orm\u002F05.relations",{"title":321,"path":322,"stem":323},"The Schema File","\u002Fruntypes\u002Fdrizzle-orm\u002Fschema-file","02.runtypes\u002F06.drizzle-orm\u002F06.schema-file",{"title":325,"path":326,"stem":327},"Migrate an Existing Schema","\u002Fruntypes\u002Fdrizzle-orm\u002Fmigrate-an-existing-schema","02.runtypes\u002F06.drizzle-orm\u002F07.migrate-an-existing-schema",{"title":329,"path":330,"stem":331},"Cloudflare D1 and Durable Objects","\u002Fruntypes\u002Fdrizzle-orm\u002Fcloudflare-storage","02.runtypes\u002F06.drizzle-orm\u002F08.cloudflare-storage",{"title":333,"icon":334,"redirect":335,"path":336,"stem":337,"children":338,"page":24},"Diagnostics","i-lucide-triangle-alert","\u002Fruntypes\u002Fdiagnostics\u002Ferror-levels","\u002Fruntypes\u002Fdiagnostics","02.runtypes\u002F08.diagnostics",[339,342],{"title":340,"path":335,"stem":341},"Error Levels","02.runtypes\u002F08.diagnostics\u002F01.error-levels",{"title":343,"path":344,"stem":345},"All Diagnostics","\u002Fruntypes\u002Fdiagnostics\u002Fall-diagnostics","02.runtypes\u002F08.diagnostics\u002F02.all-diagnostics",{"title":347,"icon":348,"path":349,"stem":350,"children":351,"page":24},"Benchmarks","i-lucide-gauge","\u002Fbenchmarks","03.benchmarks",[352,372],{"title":5,"icon":6,"redirect":353,"path":354,"stem":355,"children":356,"page":24},"\u002Fbenchmarks\u002Frpc\u002Fhello-world","\u002Fbenchmarks\u002Frpc","03.benchmarks\u002F02.rpc",[357,360,364,368],{"title":358,"path":353,"stem":359},"Hello World","03.benchmarks\u002F02.rpc\u002F01.hello-world",{"title":361,"path":362,"stem":363},"Light Validation","\u002Fbenchmarks\u002Frpc\u002Flight-validation","03.benchmarks\u002F02.rpc\u002F02.light-validation",{"title":365,"path":366,"stem":367},"Heavy Validation","\u002Fbenchmarks\u002Frpc\u002Fheavy-validation","03.benchmarks\u002F02.rpc\u002F03.heavy-validation",{"title":369,"path":370,"stem":371},"Payload Sizes","\u002Fbenchmarks\u002Frpc\u002Fpayload-sizes","03.benchmarks\u002F02.rpc\u002F04.payload-sizes",{"title":163,"icon":164,"redirect":373,"path":374,"stem":375,"children":376,"page":24},"\u002Fbenchmarks\u002Fruntypes\u002Fis-valid","\u002Fbenchmarks\u002Fruntypes","03.benchmarks\u002F03.runtypes",[377,380,384,388,392,395],{"title":378,"path":373,"stem":379},"Is Valid","03.benchmarks\u002F03.runtypes\u002F01.is-valid",{"title":381,"path":382,"stem":383},"Is Valid Formats","\u002Fbenchmarks\u002Fruntypes\u002Fis-valid-formats","03.benchmarks\u002F03.runtypes\u002F02.is-valid-formats",{"title":385,"path":386,"stem":387},"Get Errors","\u002Fbenchmarks\u002Fruntypes\u002Fget-errors","03.benchmarks\u002F03.runtypes\u002F03.get-errors",{"title":389,"path":390,"stem":391},"Get Errors Formats","\u002Fbenchmarks\u002Fruntypes\u002Fget-errors-formats","03.benchmarks\u002F03.runtypes\u002F04.get-errors-formats",{"title":56,"path":393,"stem":394},"\u002Fbenchmarks\u002Fruntypes\u002Fjson-round-trip","03.benchmarks\u002F03.runtypes\u002F05.json-round-trip",{"title":396,"path":397,"stem":398},"Type Checking","\u002Fbenchmarks\u002Fruntypes\u002Ftype-checking","03.benchmarks\u002F03.runtypes\u002F07.type-checking",{"id":400,"title":21,"body":401,"description":2014,"extension":2015,"links":2016,"meta":2017,"navigation":619,"path":22,"seo":2018,"stem":23,"__hash__":2019},"docs\u002F01.rpc\u002F01.introduction\u002F03.manual-install.md",{"type":402,"value":403},"minimark",[404,409,451,455,459,533,537,548,1227,1231,1234,1677,1680,1682,1685,1689,1703,1706,1990,2010],[405,406,408],"h2",{"id":407},"installing-the-router","Installing the Router",[410,411,416],"pre",{"className":412,"code":413,"language":414,"meta":415,"style":415},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm i @mionjs\u002Fcore @mionjs\u002Frouter\nnpm i -D @mionjs\u002Fdevtools\n","bash","",[417,418,419,438],"code",{"__ignoreMap":415},[420,421,424,428,432,435],"span",{"class":422,"line":423},"line",1,[420,425,427],{"class":426},"sBMFI","npm",[420,429,431],{"class":430},"sfazB"," i",[420,433,434],{"class":430}," @mionjs\u002Fcore",[420,436,437],{"class":430}," @mionjs\u002Frouter\n",[420,439,441,443,445,448],{"class":422,"line":440},2,[420,442,427],{"class":426},[420,444,431],{"class":430},[420,446,447],{"class":430}," -D",[420,449,450],{"class":430}," @mionjs\u002Fdevtools\n",[405,452,454],{"id":453},"installing-a-platform","Installing a Platform",[456,457,458],"p",{},"Install the package for where you run mion. For local development use Node or Bun.",[460,461,462,477,491,505,519],"code-group",{},[410,463,465],{"className":412,"code":464,"filename":110,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fplatform-node\n",[417,466,467],{"__ignoreMap":415},[420,468,469,471,474],{"class":422,"line":423},[420,470,427],{"class":426},[420,472,473],{"class":430}," install",[420,475,476],{"class":430}," @mionjs\u002Fplatform-node\n",[410,478,480],{"className":412,"code":479,"filename":113,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fplatform-bun\n",[417,481,482],{"__ignoreMap":415},[420,483,484,486,488],{"class":422,"line":423},[420,485,427],{"class":426},[420,487,473],{"class":430},[420,489,490],{"class":430}," @mionjs\u002Fplatform-bun\n",[410,492,494],{"className":412,"code":493,"filename":133,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fplatform-uws\n",[417,495,496],{"__ignoreMap":415},[420,497,498,500,502],{"class":422,"line":423},[420,499,427],{"class":426},[420,501,473],{"class":430},[420,503,504],{"class":430}," @mionjs\u002Fplatform-uws\n",[410,506,508],{"className":412,"code":507,"filename":117,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fplatform-aws\n",[417,509,510],{"__ignoreMap":415},[420,511,512,514,516],{"class":422,"line":423},[420,513,427],{"class":426},[420,515,473],{"class":430},[420,517,518],{"class":430}," @mionjs\u002Fplatform-aws\n",[410,520,522],{"className":412,"code":521,"filename":121,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fplatform-gcloud\n",[417,523,524],{"__ignoreMap":415},[420,525,526,528,530],{"class":422,"line":423},[420,527,427],{"class":426},[420,529,473],{"class":430},[420,531,532],{"class":430}," @mionjs\u002Fplatform-gcloud\n",[405,534,536],{"id":535},"writing-the-api","Writing the API",[456,538,539,540,543,544,547],{},"Create the router once with ",[417,541,542],{},"createMionRouter"," (router options go there), declare the routes with its helpers and register them with ",[417,545,546],{},"initRoutes",".",[410,549,553],{"className":550,"code":551,"language":552,"meta":415,"style":415},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {FatalError} from '@mionjs\u002Fcore';\nimport {createMionRouter, Routes} from '@mionjs\u002Frouter';\n\nexport type User = {id: string; name: string; surname: string};\n\n\u002F\u002F every helper below gets these options by type\nconst mion = createMionRouter({basePath: 'api\u002Fv1'});\n\n\u002F\u002F parameters are validated before each function runs\nconst routes = {\n  \u002F\u002F reads the HttpOnly session cookie the browser sends\n  auth: mion.middleware((ctx): void | FatalError\u003C'not-authorized'> => {\n    const cookie = ctx.request.headers.get('cookie');\n    \u002F\u002F a FatalError ends the request: sayHello never runs, and the client gets it typed\n    if (!cookie?.includes('session='))\n      return new FatalError({\n        publicMessage: 'Not Authorized',\n        type: 'not-authorized',\n      });\n  }),\n  users: {\n    sayHello: mion.route(\n      (ctx, user: User): string => `Hello ${user.name} ${user.surname}`\n    ),\n  },\n  log: mion.middleware(\n    (ctx): void => console.log(Date.now(), ctx.path, ctx.response.statusCode),\n    {alwaysRun: true}\n  ),\n} satisfies Routes;\n\nexport const myApi = mion.initRoutes(routes);\n\n\u002F\u002F the client imports only this type\nexport type MyApi = typeof myApi;\n","ts",[417,554,555,587,614,621,671,676,683,724,729,735,748,754,808,850,856,888,904,922,938,948,958,968,986,1041,1049,1055,1071,1129,1147,1155,1167,1172,1196,1201,1207],{"__ignoreMap":415},[420,556,557,561,565,569,572,575,578,581,584],{"class":422,"line":423},[420,558,560],{"class":559},"s7zQu","import",[420,562,564],{"class":563},"sMK4o"," {",[420,566,568],{"class":567},"sTEyZ","FatalError",[420,570,571],{"class":563},"}",[420,573,574],{"class":559}," from",[420,576,577],{"class":563}," '",[420,579,580],{"class":430},"@mionjs\u002Fcore",[420,582,583],{"class":563},"'",[420,585,586],{"class":563},";\n",[420,588,589,591,593,595,598,601,603,605,607,610,612],{"class":422,"line":440},[420,590,560],{"class":559},[420,592,564],{"class":563},[420,594,542],{"class":567},[420,596,597],{"class":563},",",[420,599,600],{"class":567}," Routes",[420,602,571],{"class":563},[420,604,574],{"class":559},[420,606,577],{"class":563},[420,608,609],{"class":430},"@mionjs\u002Frouter",[420,611,583],{"class":563},[420,613,586],{"class":563},[420,615,617],{"class":422,"line":616},3,[420,618,620],{"emptyLinePlaceholder":619},true,"\n",[420,622,624,627,631,634,637,639,643,646,649,652,655,657,659,661,664,666,668],{"class":422,"line":623},4,[420,625,626],{"class":559},"export",[420,628,630],{"class":629},"spNyl"," type",[420,632,633],{"class":426}," User",[420,635,636],{"class":563}," =",[420,638,564],{"class":563},[420,640,642],{"class":641},"swJcz","id",[420,644,645],{"class":563},":",[420,647,648],{"class":426}," string",[420,650,651],{"class":563},";",[420,653,654],{"class":641}," name",[420,656,645],{"class":563},[420,658,648],{"class":426},[420,660,651],{"class":563},[420,662,663],{"class":641}," surname",[420,665,645],{"class":563},[420,667,648],{"class":426},[420,669,670],{"class":563},"};\n",[420,672,674],{"class":422,"line":673},5,[420,675,620],{"emptyLinePlaceholder":619},[420,677,679],{"class":422,"line":678},6,[420,680,682],{"class":681},"sHwdD","\u002F\u002F every helper below gets these options by type\n",[420,684,686,689,692,695,699,702,705,708,710,712,715,717,719,722],{"class":422,"line":685},7,[420,687,688],{"class":629},"const",[420,690,691],{"class":567}," mion ",[420,693,694],{"class":563},"=",[420,696,698],{"class":697},"s2Zo4"," createMionRouter",[420,700,701],{"class":567},"(",[420,703,704],{"class":563},"{",[420,706,707],{"class":641},"basePath",[420,709,645],{"class":563},[420,711,577],{"class":563},[420,713,714],{"class":430},"api\u002Fv1",[420,716,583],{"class":563},[420,718,571],{"class":563},[420,720,721],{"class":567},")",[420,723,586],{"class":563},[420,725,727],{"class":422,"line":726},8,[420,728,620],{"emptyLinePlaceholder":619},[420,730,732],{"class":422,"line":731},9,[420,733,734],{"class":681},"\u002F\u002F parameters are validated before each function runs\n",[420,736,738,740,743,745],{"class":422,"line":737},10,[420,739,688],{"class":629},[420,741,742],{"class":567}," routes ",[420,744,694],{"class":563},[420,746,747],{"class":563}," {\n",[420,749,751],{"class":422,"line":750},11,[420,752,753],{"class":681},"  \u002F\u002F reads the HttpOnly session cookie the browser sends\n",[420,755,757,760,762,765,767,770,772,774,778,781,784,787,790,793,795,798,800,803,806],{"class":422,"line":756},12,[420,758,759],{"class":641},"  auth",[420,761,645],{"class":563},[420,763,764],{"class":567}," mion",[420,766,547],{"class":563},[420,768,769],{"class":697},"middleware",[420,771,701],{"class":567},[420,773,701],{"class":563},[420,775,777],{"class":776},"sHdIc","ctx",[420,779,780],{"class":563},"):",[420,782,783],{"class":426}," void",[420,785,786],{"class":563}," |",[420,788,789],{"class":426}," FatalError",[420,791,792],{"class":563},"\u003C",[420,794,583],{"class":563},[420,796,797],{"class":430},"not-authorized",[420,799,583],{"class":563},[420,801,802],{"class":563},">",[420,804,805],{"class":629}," =>",[420,807,747],{"class":563},[420,809,811,814,817,819,822,824,827,829,832,834,837,839,841,844,846,848],{"class":422,"line":810},13,[420,812,813],{"class":629},"    const",[420,815,816],{"class":567}," cookie",[420,818,636],{"class":563},[420,820,821],{"class":567}," ctx",[420,823,547],{"class":563},[420,825,826],{"class":567},"request",[420,828,547],{"class":563},[420,830,831],{"class":567},"headers",[420,833,547],{"class":563},[420,835,836],{"class":697},"get",[420,838,701],{"class":641},[420,840,583],{"class":563},[420,842,843],{"class":430},"cookie",[420,845,583],{"class":563},[420,847,721],{"class":641},[420,849,586],{"class":563},[420,851,853],{"class":422,"line":852},14,[420,854,855],{"class":681},"    \u002F\u002F a FatalError ends the request: sayHello never runs, and the client gets it typed\n",[420,857,859,862,865,868,870,873,876,878,880,883,885],{"class":422,"line":858},15,[420,860,861],{"class":559},"    if",[420,863,864],{"class":641}," (",[420,866,867],{"class":563},"!",[420,869,843],{"class":567},[420,871,872],{"class":563},"?.",[420,874,875],{"class":697},"includes",[420,877,701],{"class":641},[420,879,583],{"class":563},[420,881,882],{"class":430},"session=",[420,884,583],{"class":563},[420,886,887],{"class":641},"))\n",[420,889,891,894,897,899,901],{"class":422,"line":890},16,[420,892,893],{"class":559},"      return",[420,895,896],{"class":563}," new",[420,898,789],{"class":697},[420,900,701],{"class":641},[420,902,903],{"class":563},"{\n",[420,905,907,910,912,914,917,919],{"class":422,"line":906},17,[420,908,909],{"class":641},"        publicMessage",[420,911,645],{"class":563},[420,913,577],{"class":563},[420,915,916],{"class":430},"Not Authorized",[420,918,583],{"class":563},[420,920,921],{"class":563},",\n",[420,923,925,928,930,932,934,936],{"class":422,"line":924},18,[420,926,927],{"class":641},"        type",[420,929,645],{"class":563},[420,931,577],{"class":563},[420,933,797],{"class":430},[420,935,583],{"class":563},[420,937,921],{"class":563},[420,939,941,944,946],{"class":422,"line":940},19,[420,942,943],{"class":563},"      }",[420,945,721],{"class":641},[420,947,586],{"class":563},[420,949,951,954,956],{"class":422,"line":950},20,[420,952,953],{"class":563},"  }",[420,955,721],{"class":567},[420,957,921],{"class":563},[420,959,961,964,966],{"class":422,"line":960},21,[420,962,963],{"class":641},"  users",[420,965,645],{"class":563},[420,967,747],{"class":563},[420,969,971,974,976,978,980,983],{"class":422,"line":970},22,[420,972,973],{"class":641},"    sayHello",[420,975,645],{"class":563},[420,977,764],{"class":567},[420,979,547],{"class":563},[420,981,982],{"class":697},"route",[420,984,985],{"class":567},"(\n",[420,987,989,992,994,996,999,1001,1003,1005,1007,1009,1012,1015,1018,1021,1023,1026,1028,1031,1033,1035,1038],{"class":422,"line":988},23,[420,990,991],{"class":563},"      (",[420,993,777],{"class":776},[420,995,597],{"class":563},[420,997,998],{"class":776}," user",[420,1000,645],{"class":563},[420,1002,633],{"class":426},[420,1004,780],{"class":563},[420,1006,648],{"class":426},[420,1008,805],{"class":629},[420,1010,1011],{"class":563}," `",[420,1013,1014],{"class":430},"Hello ",[420,1016,1017],{"class":563},"${",[420,1019,1020],{"class":567},"user",[420,1022,547],{"class":563},[420,1024,1025],{"class":567},"name",[420,1027,571],{"class":563},[420,1029,1030],{"class":563}," ${",[420,1032,1020],{"class":567},[420,1034,547],{"class":563},[420,1036,1037],{"class":567},"surname",[420,1039,1040],{"class":563},"}`\n",[420,1042,1044,1047],{"class":422,"line":1043},24,[420,1045,1046],{"class":567},"    )",[420,1048,921],{"class":563},[420,1050,1052],{"class":422,"line":1051},25,[420,1053,1054],{"class":563},"  },\n",[420,1056,1058,1061,1063,1065,1067,1069],{"class":422,"line":1057},26,[420,1059,1060],{"class":641},"  log",[420,1062,645],{"class":563},[420,1064,764],{"class":567},[420,1066,547],{"class":563},[420,1068,769],{"class":697},[420,1070,985],{"class":567},[420,1072,1074,1077,1079,1081,1083,1085,1088,1090,1093,1096,1098,1101,1104,1106,1108,1110,1113,1115,1117,1119,1122,1124,1127],{"class":422,"line":1073},27,[420,1075,1076],{"class":563},"    (",[420,1078,777],{"class":776},[420,1080,780],{"class":563},[420,1082,783],{"class":426},[420,1084,805],{"class":629},[420,1086,1087],{"class":567}," console",[420,1089,547],{"class":563},[420,1091,1092],{"class":697},"log",[420,1094,1095],{"class":567},"(Date",[420,1097,547],{"class":563},[420,1099,1100],{"class":697},"now",[420,1102,1103],{"class":567},"()",[420,1105,597],{"class":563},[420,1107,821],{"class":567},[420,1109,547],{"class":563},[420,1111,1112],{"class":567},"path",[420,1114,597],{"class":563},[420,1116,821],{"class":567},[420,1118,547],{"class":563},[420,1120,1121],{"class":567},"response",[420,1123,547],{"class":563},[420,1125,1126],{"class":567},"statusCode)",[420,1128,921],{"class":563},[420,1130,1132,1135,1138,1140,1144],{"class":422,"line":1131},28,[420,1133,1134],{"class":563},"    {",[420,1136,1137],{"class":641},"alwaysRun",[420,1139,645],{"class":563},[420,1141,1143],{"class":1142},"sfNiH"," true",[420,1145,1146],{"class":563},"}\n",[420,1148,1150,1153],{"class":422,"line":1149},29,[420,1151,1152],{"class":567},"  )",[420,1154,921],{"class":563},[420,1156,1158,1160,1163,1165],{"class":422,"line":1157},30,[420,1159,571],{"class":563},[420,1161,1162],{"class":559}," satisfies",[420,1164,600],{"class":426},[420,1166,586],{"class":563},[420,1168,1170],{"class":422,"line":1169},31,[420,1171,620],{"emptyLinePlaceholder":619},[420,1173,1175,1177,1180,1183,1185,1187,1189,1191,1194],{"class":422,"line":1174},32,[420,1176,626],{"class":559},[420,1178,1179],{"class":629}," const",[420,1181,1182],{"class":567}," myApi ",[420,1184,694],{"class":563},[420,1186,764],{"class":567},[420,1188,547],{"class":563},[420,1190,546],{"class":697},[420,1192,1193],{"class":567},"(routes)",[420,1195,586],{"class":563},[420,1197,1199],{"class":422,"line":1198},33,[420,1200,620],{"emptyLinePlaceholder":619},[420,1202,1204],{"class":422,"line":1203},34,[420,1205,1206],{"class":681},"\u002F\u002F the client imports only this type\n",[420,1208,1210,1212,1214,1217,1219,1222,1225],{"class":422,"line":1209},35,[420,1211,626],{"class":559},[420,1213,630],{"class":629},[420,1215,1216],{"class":426}," MyApi",[420,1218,636],{"class":563},[420,1220,1221],{"class":563}," typeof",[420,1223,1224],{"class":567}," myApi",[420,1226,586],{"class":563},[405,1228,1230],{"id":1229},"starting-the-server","Starting the Server",[456,1232,1233],{},"Write a start script for your platform.",[460,1235,1236,1328,1415,1502,1590],{},[410,1237,1239],{"className":550,"code":1238,"filename":110,"language":552,"meta":415,"style":415},"import {NodeHttpOptions, startNodeServer} from '@mionjs\u002Fplatform-node';\nimport '.\u002FmyApi.routes.ts';\n\nconst nodeOptions: Partial\u003CNodeHttpOptions> = {port: 3000};\nstartNodeServer(nodeOptions);\n",[417,1240,1241,1268,1281,1285,1318],{"__ignoreMap":415},[420,1242,1243,1245,1247,1250,1252,1255,1257,1259,1261,1264,1266],{"class":422,"line":423},[420,1244,560],{"class":559},[420,1246,564],{"class":563},[420,1248,1249],{"class":567},"NodeHttpOptions",[420,1251,597],{"class":563},[420,1253,1254],{"class":567}," startNodeServer",[420,1256,571],{"class":563},[420,1258,574],{"class":559},[420,1260,577],{"class":563},[420,1262,1263],{"class":430},"@mionjs\u002Fplatform-node",[420,1265,583],{"class":563},[420,1267,586],{"class":563},[420,1269,1270,1272,1274,1277,1279],{"class":422,"line":440},[420,1271,560],{"class":559},[420,1273,577],{"class":563},[420,1275,1276],{"class":430},".\u002FmyApi.routes.ts",[420,1278,583],{"class":563},[420,1280,586],{"class":563},[420,1282,1283],{"class":422,"line":616},[420,1284,620],{"emptyLinePlaceholder":619},[420,1286,1287,1289,1292,1294,1297,1299,1301,1303,1305,1307,1310,1312,1316],{"class":422,"line":623},[420,1288,688],{"class":629},[420,1290,1291],{"class":567}," nodeOptions",[420,1293,645],{"class":563},[420,1295,1296],{"class":426}," Partial",[420,1298,792],{"class":563},[420,1300,1249],{"class":426},[420,1302,802],{"class":563},[420,1304,636],{"class":563},[420,1306,564],{"class":563},[420,1308,1309],{"class":641},"port",[420,1311,645],{"class":563},[420,1313,1315],{"class":1314},"sbssI"," 3000",[420,1317,670],{"class":563},[420,1319,1320,1323,1326],{"class":422,"line":673},[420,1321,1322],{"class":697},"startNodeServer",[420,1324,1325],{"class":567},"(nodeOptions)",[420,1327,586],{"class":563},[410,1329,1331],{"className":550,"code":1330,"filename":113,"language":552,"meta":415,"style":415},"import {BunHttpOptions, startBunServer} from '@mionjs\u002Fplatform-bun';\nimport '.\u002FmyApi.routes.ts';\n\nconst bunOptions: Partial\u003CBunHttpOptions> = {port: 3000};\nstartBunServer(bunOptions);\n",[417,1332,1333,1360,1372,1376,1405],{"__ignoreMap":415},[420,1334,1335,1337,1339,1342,1344,1347,1349,1351,1353,1356,1358],{"class":422,"line":423},[420,1336,560],{"class":559},[420,1338,564],{"class":563},[420,1340,1341],{"class":567},"BunHttpOptions",[420,1343,597],{"class":563},[420,1345,1346],{"class":567}," startBunServer",[420,1348,571],{"class":563},[420,1350,574],{"class":559},[420,1352,577],{"class":563},[420,1354,1355],{"class":430},"@mionjs\u002Fplatform-bun",[420,1357,583],{"class":563},[420,1359,586],{"class":563},[420,1361,1362,1364,1366,1368,1370],{"class":422,"line":440},[420,1363,560],{"class":559},[420,1365,577],{"class":563},[420,1367,1276],{"class":430},[420,1369,583],{"class":563},[420,1371,586],{"class":563},[420,1373,1374],{"class":422,"line":616},[420,1375,620],{"emptyLinePlaceholder":619},[420,1377,1378,1380,1383,1385,1387,1389,1391,1393,1395,1397,1399,1401,1403],{"class":422,"line":623},[420,1379,688],{"class":629},[420,1381,1382],{"class":567}," bunOptions",[420,1384,645],{"class":563},[420,1386,1296],{"class":426},[420,1388,792],{"class":563},[420,1390,1341],{"class":426},[420,1392,802],{"class":563},[420,1394,636],{"class":563},[420,1396,564],{"class":563},[420,1398,1309],{"class":641},[420,1400,645],{"class":563},[420,1402,1315],{"class":1314},[420,1404,670],{"class":563},[420,1406,1407,1410,1413],{"class":422,"line":673},[420,1408,1409],{"class":697},"startBunServer",[420,1411,1412],{"class":567},"(bunOptions)",[420,1414,586],{"class":563},[410,1416,1418],{"className":550,"code":1417,"filename":133,"language":552,"meta":415,"style":415},"import {UwsHttpOptions, startUwsServer} from '@mionjs\u002Fplatform-uws';\nimport '.\u002FmyApi.routes.ts';\n\nconst uwsOptions: Partial\u003CUwsHttpOptions> = {port: 3000};\nstartUwsServer(uwsOptions);\n",[417,1419,1420,1447,1459,1463,1492],{"__ignoreMap":415},[420,1421,1422,1424,1426,1429,1431,1434,1436,1438,1440,1443,1445],{"class":422,"line":423},[420,1423,560],{"class":559},[420,1425,564],{"class":563},[420,1427,1428],{"class":567},"UwsHttpOptions",[420,1430,597],{"class":563},[420,1432,1433],{"class":567}," startUwsServer",[420,1435,571],{"class":563},[420,1437,574],{"class":559},[420,1439,577],{"class":563},[420,1441,1442],{"class":430},"@mionjs\u002Fplatform-uws",[420,1444,583],{"class":563},[420,1446,586],{"class":563},[420,1448,1449,1451,1453,1455,1457],{"class":422,"line":440},[420,1450,560],{"class":559},[420,1452,577],{"class":563},[420,1454,1276],{"class":430},[420,1456,583],{"class":563},[420,1458,586],{"class":563},[420,1460,1461],{"class":422,"line":616},[420,1462,620],{"emptyLinePlaceholder":619},[420,1464,1465,1467,1470,1472,1474,1476,1478,1480,1482,1484,1486,1488,1490],{"class":422,"line":623},[420,1466,688],{"class":629},[420,1468,1469],{"class":567}," uwsOptions",[420,1471,645],{"class":563},[420,1473,1296],{"class":426},[420,1475,792],{"class":563},[420,1477,1428],{"class":426},[420,1479,802],{"class":563},[420,1481,636],{"class":563},[420,1483,564],{"class":563},[420,1485,1309],{"class":641},[420,1487,645],{"class":563},[420,1489,1315],{"class":1314},[420,1491,670],{"class":563},[420,1493,1494,1497,1500],{"class":422,"line":673},[420,1495,1496],{"class":697},"startUwsServer",[420,1498,1499],{"class":567},"(uwsOptions)",[420,1501,586],{"class":563},[410,1503,1505],{"className":550,"code":1504,"filename":117,"language":552,"meta":415,"style":415},"import {AwsLambdaOptions, createAwsLambdaHandler} from '@mionjs\u002Fplatform-aws';\nimport '.\u002FmyApi.routes.ts';\n\nconst awsOptions: Partial\u003CAwsLambdaOptions> = {};\nexport const handler = createAwsLambdaHandler(awsOptions);\n",[417,1506,1507,1534,1546,1550,1572],{"__ignoreMap":415},[420,1508,1509,1511,1513,1516,1518,1521,1523,1525,1527,1530,1532],{"class":422,"line":423},[420,1510,560],{"class":559},[420,1512,564],{"class":563},[420,1514,1515],{"class":567},"AwsLambdaOptions",[420,1517,597],{"class":563},[420,1519,1520],{"class":567}," createAwsLambdaHandler",[420,1522,571],{"class":563},[420,1524,574],{"class":559},[420,1526,577],{"class":563},[420,1528,1529],{"class":430},"@mionjs\u002Fplatform-aws",[420,1531,583],{"class":563},[420,1533,586],{"class":563},[420,1535,1536,1538,1540,1542,1544],{"class":422,"line":440},[420,1537,560],{"class":559},[420,1539,577],{"class":563},[420,1541,1276],{"class":430},[420,1543,583],{"class":563},[420,1545,586],{"class":563},[420,1547,1548],{"class":422,"line":616},[420,1549,620],{"emptyLinePlaceholder":619},[420,1551,1552,1554,1557,1559,1561,1563,1565,1567,1569],{"class":422,"line":623},[420,1553,688],{"class":629},[420,1555,1556],{"class":567}," awsOptions",[420,1558,645],{"class":563},[420,1560,1296],{"class":426},[420,1562,792],{"class":563},[420,1564,1515],{"class":426},[420,1566,802],{"class":563},[420,1568,636],{"class":563},[420,1570,1571],{"class":563}," {};\n",[420,1573,1574,1576,1578,1581,1583,1585,1588],{"class":422,"line":673},[420,1575,626],{"class":559},[420,1577,1179],{"class":629},[420,1579,1580],{"class":567}," handler ",[420,1582,694],{"class":563},[420,1584,1520],{"class":697},[420,1586,1587],{"class":567},"(awsOptions)",[420,1589,586],{"class":563},[410,1591,1594],{"className":550,"code":1592,"filename":1593,"language":552,"meta":415,"style":415},"import {GoogleCFOptions, createGoogleCFHandler} from '@mionjs\u002Fplatform-gcloud';\nimport '.\u002FmyApi.routes.ts';\n\nconst gcfOptions: Partial\u003CGoogleCFOptions> = {};\nexport const handler = createGoogleCFHandler(gcfOptions);\n","Google Cloud",[417,1595,1596,1623,1635,1639,1660],{"__ignoreMap":415},[420,1597,1598,1600,1602,1605,1607,1610,1612,1614,1616,1619,1621],{"class":422,"line":423},[420,1599,560],{"class":559},[420,1601,564],{"class":563},[420,1603,1604],{"class":567},"GoogleCFOptions",[420,1606,597],{"class":563},[420,1608,1609],{"class":567}," createGoogleCFHandler",[420,1611,571],{"class":563},[420,1613,574],{"class":559},[420,1615,577],{"class":563},[420,1617,1618],{"class":430},"@mionjs\u002Fplatform-gcloud",[420,1620,583],{"class":563},[420,1622,586],{"class":563},[420,1624,1625,1627,1629,1631,1633],{"class":422,"line":440},[420,1626,560],{"class":559},[420,1628,577],{"class":563},[420,1630,1276],{"class":430},[420,1632,583],{"class":563},[420,1634,586],{"class":563},[420,1636,1637],{"class":422,"line":616},[420,1638,620],{"emptyLinePlaceholder":619},[420,1640,1641,1643,1646,1648,1650,1652,1654,1656,1658],{"class":422,"line":623},[420,1642,688],{"class":629},[420,1644,1645],{"class":567}," gcfOptions",[420,1647,645],{"class":563},[420,1649,1296],{"class":426},[420,1651,792],{"class":563},[420,1653,1604],{"class":426},[420,1655,802],{"class":563},[420,1657,636],{"class":563},[420,1659,1571],{"class":563},[420,1661,1662,1664,1666,1668,1670,1672,1675],{"class":422,"line":673},[420,1663,626],{"class":559},[420,1665,1179],{"class":629},[420,1667,1580],{"class":567},[420,1669,694],{"class":563},[420,1671,1609],{"class":697},[420,1673,1674],{"class":567},"(gcfOptions)",[420,1676,586],{"class":563},[1678,1679],"br",{},[1678,1681],{},[1683,1684],"spacer",{},[405,1686,1688],{"id":1687},"client-setup","Client Setup",[410,1690,1692],{"className":412,"code":1691,"language":414,"meta":415,"style":415},"npm install @mionjs\u002Fclient\n",[417,1693,1694],{"__ignoreMap":415},[420,1695,1696,1698,1700],{"class":422,"line":423},[420,1697,427],{"class":426},[420,1699,473],{"class":430},[420,1701,1702],{"class":430}," @mionjs\u002Fclient\n",[456,1704,1705],{},"Import only the type of your API, so no server code is imported.",[410,1707,1709],{"className":550,"code":1708,"language":552,"meta":415,"style":415},"import {initClient} from '@mionjs\u002Fclient';\nimport type {MyApi} from '.\u002FmyApi.routes.ts';\n\nconst john = {id: '123', name: 'John', surname: 'Doe'};\nconst {routes} = initClient\u003CMyApi>({\n  baseURL: 'http:\u002F\u002Flocalhost:3000',\n});\n\nconst [hello] = await routes.users.sayHello(john).call();\nconsole.log(hello); \u002F\u002F Hello John Doe\n\n\u002F\u002F checks params locally, without calling the server\nconst [_, error] = await routes.users.sayHello(john).typeErrors();\nconsole.log(error); \u002F\u002F {hasErrors: false, totalErrors: 0, errors: []}\n",[417,1710,1711,1733,1756,1760,1810,1836,1852,1860,1864,1907,1924,1928,1933,1974],{"__ignoreMap":415},[420,1712,1713,1715,1717,1720,1722,1724,1726,1729,1731],{"class":422,"line":423},[420,1714,560],{"class":559},[420,1716,564],{"class":563},[420,1718,1719],{"class":567},"initClient",[420,1721,571],{"class":563},[420,1723,574],{"class":559},[420,1725,577],{"class":563},[420,1727,1728],{"class":430},"@mionjs\u002Fclient",[420,1730,583],{"class":563},[420,1732,586],{"class":563},[420,1734,1735,1737,1739,1741,1744,1746,1748,1750,1752,1754],{"class":422,"line":440},[420,1736,560],{"class":559},[420,1738,630],{"class":559},[420,1740,564],{"class":563},[420,1742,1743],{"class":567},"MyApi",[420,1745,571],{"class":563},[420,1747,574],{"class":559},[420,1749,577],{"class":563},[420,1751,1276],{"class":430},[420,1753,583],{"class":563},[420,1755,586],{"class":563},[420,1757,1758],{"class":422,"line":616},[420,1759,620],{"emptyLinePlaceholder":619},[420,1761,1762,1764,1767,1769,1771,1773,1775,1777,1780,1782,1784,1786,1788,1790,1793,1795,1797,1799,1801,1803,1806,1808],{"class":422,"line":623},[420,1763,688],{"class":629},[420,1765,1766],{"class":567}," john ",[420,1768,694],{"class":563},[420,1770,564],{"class":563},[420,1772,642],{"class":641},[420,1774,645],{"class":563},[420,1776,577],{"class":563},[420,1778,1779],{"class":430},"123",[420,1781,583],{"class":563},[420,1783,597],{"class":563},[420,1785,654],{"class":641},[420,1787,645],{"class":563},[420,1789,577],{"class":563},[420,1791,1792],{"class":430},"John",[420,1794,583],{"class":563},[420,1796,597],{"class":563},[420,1798,663],{"class":641},[420,1800,645],{"class":563},[420,1802,577],{"class":563},[420,1804,1805],{"class":430},"Doe",[420,1807,583],{"class":563},[420,1809,670],{"class":563},[420,1811,1812,1814,1816,1819,1821,1823,1826,1828,1830,1832,1834],{"class":422,"line":673},[420,1813,688],{"class":629},[420,1815,564],{"class":563},[420,1817,1818],{"class":567},"routes",[420,1820,571],{"class":563},[420,1822,636],{"class":563},[420,1824,1825],{"class":697}," initClient",[420,1827,792],{"class":563},[420,1829,1743],{"class":426},[420,1831,802],{"class":563},[420,1833,701],{"class":567},[420,1835,903],{"class":563},[420,1837,1838,1841,1843,1845,1848,1850],{"class":422,"line":678},[420,1839,1840],{"class":641},"  baseURL",[420,1842,645],{"class":563},[420,1844,577],{"class":563},[420,1846,1847],{"class":430},"http:\u002F\u002Flocalhost:3000",[420,1849,583],{"class":563},[420,1851,921],{"class":563},[420,1853,1854,1856,1858],{"class":422,"line":685},[420,1855,571],{"class":563},[420,1857,721],{"class":567},[420,1859,586],{"class":563},[420,1861,1862],{"class":422,"line":726},[420,1863,620],{"emptyLinePlaceholder":619},[420,1865,1866,1868,1871,1874,1877,1879,1882,1885,1887,1890,1892,1895,1898,1900,1903,1905],{"class":422,"line":731},[420,1867,688],{"class":629},[420,1869,1870],{"class":563}," [",[420,1872,1873],{"class":567},"hello",[420,1875,1876],{"class":563},"]",[420,1878,636],{"class":563},[420,1880,1881],{"class":559}," await",[420,1883,1884],{"class":567}," routes",[420,1886,547],{"class":563},[420,1888,1889],{"class":567},"users",[420,1891,547],{"class":563},[420,1893,1894],{"class":697},"sayHello",[420,1896,1897],{"class":567},"(john)",[420,1899,547],{"class":563},[420,1901,1902],{"class":697},"call",[420,1904,1103],{"class":567},[420,1906,586],{"class":563},[420,1908,1909,1912,1914,1916,1919,1921],{"class":422,"line":737},[420,1910,1911],{"class":567},"console",[420,1913,547],{"class":563},[420,1915,1092],{"class":697},[420,1917,1918],{"class":567},"(hello)",[420,1920,651],{"class":563},[420,1922,1923],{"class":681}," \u002F\u002F Hello John Doe\n",[420,1925,1926],{"class":422,"line":750},[420,1927,620],{"emptyLinePlaceholder":619},[420,1929,1930],{"class":422,"line":756},[420,1931,1932],{"class":681},"\u002F\u002F checks params locally, without calling the server\n",[420,1934,1935,1937,1939,1942,1944,1947,1949,1951,1953,1955,1957,1959,1961,1963,1965,1967,1970,1972],{"class":422,"line":810},[420,1936,688],{"class":629},[420,1938,1870],{"class":563},[420,1940,1941],{"class":567},"_",[420,1943,597],{"class":563},[420,1945,1946],{"class":567}," error",[420,1948,1876],{"class":563},[420,1950,636],{"class":563},[420,1952,1881],{"class":559},[420,1954,1884],{"class":567},[420,1956,547],{"class":563},[420,1958,1889],{"class":567},[420,1960,547],{"class":563},[420,1962,1894],{"class":697},[420,1964,1897],{"class":567},[420,1966,547],{"class":563},[420,1968,1969],{"class":697},"typeErrors",[420,1971,1103],{"class":567},[420,1973,586],{"class":563},[420,1975,1976,1978,1980,1982,1985,1987],{"class":422,"line":852},[420,1977,1911],{"class":567},[420,1979,547],{"class":563},[420,1981,1092],{"class":697},[420,1983,1984],{"class":567},"(error)",[420,1986,651],{"class":563},[420,1988,1989],{"class":681}," \u002F\u002F {hasErrors: false, totalErrors: 0, errors: []}\n",[1991,1992,1993,1994,1999,2000,2003,2004,547],"note",{},"The mion ",[1995,1996,1998],"a",{"href":1997},"..\u002Fdevtools\u002Fvite","Vite plugin"," compiles every route's validation and JSON round trip functions at build time, for faster startup. To deploy where runtime ",[417,2001,2002],{},"new Function()"," is blocked, set ",[1995,2005,2007],{"href":2006},"\u002Frpc\u002Fdevtools\u002Fvite#all-plugin-options",[417,2008,2009],{},"emitMode: 'both'",[2011,2012,2013],"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 .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 .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}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}","How to manually configure a mion app.","md",null,{"toc":24},{"title":21,"description":2014},"mspwqeUbEGLbjBPEDhYVEDOEgUDw0yCEML90tAWMFPM",1793324368965]