[{"data":1,"prerenderedAt":409},["ShallowReactive",2],{"navigation":3,"-deploy-workers":225,"-deploy-workers-surround":405},[4,76,219],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Docs","/guide","1.guide/0.index",[9,11,16,21,26,31,36,41,46,51,56,61,66,71],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Server Utils","/guide/utils","1.guide/1.utils","ri:tools-line",{"title":17,"path":18,"stem":19,"icon":20},"Tasks","/guide/tasks","1.guide/10.tasks","codicon:run-all",{"title":22,"path":23,"stem":24,"icon":25},"Server Routes","/guide/routing","1.guide/2.routing","ri:direction-line",{"title":27,"path":28,"stem":29,"icon":30},"WebSocket","/guide/websocket","1.guide/3.websocket","cib:socket-io",{"title":32,"path":33,"stem":34,"icon":35},"KV Storage","/guide/storage","1.guide/4.storage","carbon:datastore",{"title":37,"path":38,"stem":39,"icon":40},"SQL Database","/guide/database","1.guide/5.database","ri:database-2-line",{"title":42,"path":43,"stem":44,"icon":45},"Cache","/guide/cache","1.guide/6.cache","ri:speed-line",{"title":47,"path":48,"stem":49,"icon":50},"Fetch","/guide/fetch","1.guide/7.fetch","ri:global-line",{"title":52,"path":53,"stem":54,"icon":55},"Assets","/guide/assets","1.guide/8.assets","ri:image-2-line",{"title":57,"path":58,"stem":59,"icon":60},"Plugins","/guide/plugins","1.guide/9.plugins","ri:plug-line",{"title":62,"path":63,"stem":64,"icon":65},"Configuration","/guide/configuration","1.guide/97.configuration","ri:settings-3-line",{"title":67,"path":68,"stem":69,"icon":70},"TypeScript","/guide/typescript","1.guide/98.typescript","tabler:brand-typescript",{"title":72,"path":73,"stem":74,"icon":75},"Nightly Channel","/guide/nightly","1.guide/99.nightly","ri:moon-fill",{"title":77,"path":78,"stem":79,"children":80,"icon":82},"Deploy","/deploy","2.deploy/0.index",[81,83,87,113,118],{"title":77,"path":78,"stem":79,"icon":82},"ri:upload-cloud-2-line",{"title":84,"path":85,"stem":86,"icon":50},"Edge Workers","/deploy/workers","2.deploy/1.workers",{"title":88,"path":89,"stem":90,"children":91,"page":112},"Runtimes","/deploy/runtimes","2.deploy/10.runtimes",[92,97,102,107],{"title":93,"path":94,"stem":95,"icon":96},"Node.js","/deploy/runtimes/node","2.deploy/10.runtimes/1.node","akar-icons:node-fill",{"title":98,"path":99,"stem":100,"icon":101},"WinterJS","/deploy/runtimes/_winterjs","2.deploy/10.runtimes/_winterjs","game-icons:cold-heart",{"title":103,"path":104,"stem":105,"icon":106},"Bun","/deploy/runtimes/bun","2.deploy/10.runtimes/bun","simple-icons:bun",{"title":108,"path":109,"stem":110,"icon":111},"Deno","/deploy/runtimes/deno","2.deploy/10.runtimes/deno","simple-icons:deno",false,{"title":114,"path":115,"stem":116,"icon":117},"Custom Preset","/deploy/custom-presets","2.deploy/2.custom-presets","ri:file-code-line",{"title":119,"path":120,"stem":121,"children":122,"page":112},"Providers","/deploy/providers","2.deploy/20.providers",[123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215],{"title":124,"path":125,"stem":126},"Alwaysdata","/deploy/providers/alwaysdata","2.deploy/20.providers/alwaysdata",{"title":128,"path":129,"stem":130},"AWS Lambda","/deploy/providers/aws","2.deploy/20.providers/aws",{"title":132,"path":133,"stem":134},"AWS Amplify","/deploy/providers/aws-amplify","2.deploy/20.providers/aws-amplify",{"title":136,"path":137,"stem":138},"Azure","/deploy/providers/azure","2.deploy/20.providers/azure",{"title":140,"path":141,"stem":142},"Cleavr","/deploy/providers/cleavr","2.deploy/20.providers/cleavr",{"title":144,"path":145,"stem":146},"Cloudflare","/deploy/providers/cloudflare","2.deploy/20.providers/cloudflare",{"title":148,"path":149,"stem":150},"Deno Deploy","/deploy/providers/deno-deploy","2.deploy/20.providers/deno-deploy",{"title":152,"path":153,"stem":154},"DigitalOcean","/deploy/providers/digitalocean","2.deploy/20.providers/digitalocean",{"title":156,"path":157,"stem":158},"Edgio","/deploy/providers/edgio","2.deploy/20.providers/edgio",{"title":160,"path":161,"stem":162},"Firebase","/deploy/providers/firebase","2.deploy/20.providers/firebase",{"title":164,"path":165,"stem":166},"Flightcontrol","/deploy/providers/flightcontrol","2.deploy/20.providers/flightcontrol",{"title":168,"path":169,"stem":170},"Genezio","/deploy/providers/genezio","2.deploy/20.providers/genezio",{"title":172,"path":173,"stem":174},"GitHub Pages","/deploy/providers/github-pages","2.deploy/20.providers/github-pages",{"title":176,"path":177,"stem":178},"GitLab Pages","/deploy/providers/gitlab-pages","2.deploy/20.providers/gitlab-pages",{"title":180,"path":181,"stem":182},"Heroku","/deploy/providers/heroku","2.deploy/20.providers/heroku",{"title":184,"path":185,"stem":186},"IIS","/deploy/providers/iis","2.deploy/20.providers/iis",{"title":188,"path":189,"stem":190},"Koyeb","/deploy/providers/koyeb","2.deploy/20.providers/koyeb",{"title":192,"path":193,"stem":194},"Netlify","/deploy/providers/netlify","2.deploy/20.providers/netlify",{"title":196,"path":197,"stem":198},"Platform.sh","/deploy/providers/platform-sh","2.deploy/20.providers/platform-sh",{"title":200,"path":201,"stem":202},"Render.com","/deploy/providers/render","2.deploy/20.providers/render",{"title":204,"path":205,"stem":206},"StormKit","/deploy/providers/stormkit","2.deploy/20.providers/stormkit",{"title":208,"path":209,"stem":210},"Vercel","/deploy/providers/vercel","2.deploy/20.providers/vercel",{"title":212,"path":213,"stem":214},"Zeabur","/deploy/providers/zeabur","2.deploy/20.providers/zeabur",{"title":216,"path":217,"stem":218},"Zerops","/deploy/providers/zerops","2.deploy/20.providers/zerops",{"title":220,"path":221,"stem":222,"children":223,"icon":65},"Config","/config","3.config/0.index",[224],{"title":220,"path":221,"stem":222,"icon":65},{"id":226,"title":84,"body":227,"description":399,"extension":400,"meta":401,"navigation":402,"path":85,"seo":403,"stem":86,"__hash__":404},"content/2.deploy/1.workers.md",{"type":228,"value":229,"toc":390,"icon":50},"minimark",[230,235,239,276,281,307,311,323,326,332,349,354,363],[231,232,234],"h2",{"id":233},"deploy-to-workers","Deploy to workers",[236,237,238],"p",{},"Nitro provides out of the box support for deploying any Nitro app to different Edge Worker offerings as well as Service Workers.",[240,241,242,248,252,257,262],"ul",{},[243,244,245],"li",{},[246,247,144],"a",{"href":145},[243,249,250],{},[246,251,148],{"href":149},[243,253,254],{},[246,255,208],{"href":256},"/deploy/providers/vercel#vercel-edge-functions",[243,258,259],{},[246,260,192],{"href":261},"/deploy/providers/netlify#netlify-edge-functions",[243,263,264,270,271,275],{},[246,265,269],{"href":266,"rel":267},"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API",[268],"nofollow","Browser Service Workers"," (via experimental preset ",[272,273,274],"code",{},"service-worker",")",[277,278,280],"h3",{"id":279},"worker-limitations","Worker limitations",[240,282,283,286,289,296,299],{},[243,284,285],{},"No support for raw TCP/IP traffic",[243,287,288],{},"Execution time is limited compared to classic serverless offerings (normally 15-30 seconds)",[243,290,291,292,295],{},"No access to the filesystem (use the ",[246,293,294],{"href":33},"nitro storage"," layer)",[243,297,298],{},"Bundle size is very limited (normally a few MBs)",[243,300,301,302,275],{},"Limited access Node.js APIs (nitro provides compatibility layer via ",[246,303,306],{"href":304,"rel":305},"https://github.com/unjs/unenv",[268],"unenv",[277,308,310],{"id":309},"incompatible-libraries","Incompatible libraries",[312,313,314],"note",{},[236,315,316,317,322],{},"If you come across a library that you assume to be incompatible with edge workers, please open an issue on the ",[246,318,321],{"href":319,"rel":320},"https://github.com/nitrojs/nitro/issues/new/choose",[268],"nitro repo"," and help us keeping this list up to date.",[236,324,325],{},"The following libraries are known to be incompatible with edge workers because of one of the above mentioned limitations:",[327,328,330],"h4",{"id":329},"mongodb",[272,331,329],{},[333,334,335],"blockquote",{},[236,336,337,338,343,344],{},"There are possible fixes for MongoDB, like using Realm and the ",[246,339,342],{"href":340,"rel":341},"https://www.mongodb.com/docs/realm/sdk/node/",[268],"Realm SDK"," or\nusing http interfaces (only available when self hosting MongoDB), but these are untested. You can find an example for using realm ",[246,345,348],{"href":346,"rel":347},"https://github.com/albionstatus/albionstatus-backend/",[268],"here",[327,350,352],{"id":351},"mysql",[272,353,351],{},[333,355,356],{},[236,357,358,359],{},"You can find an example with a modified MySQL driver ",[246,360,348],{"href":361,"rel":362},"https://github.com/cloudflare/worker-template-mysql",[268],[240,364,365,370,375,380,385],{},[243,366,367],{},[272,368,369],{},"rhea",[243,371,372],{},[272,373,374],{},"gremlin",[243,376,377],{},[272,378,379],{},"ioredis",[243,381,382],{},[272,383,384],{},"cassandra-driver",[243,386,387],{},[272,388,389],{},"kafkajs",{"title":391,"searchDepth":392,"depth":392,"links":393},"",2,[394],{"id":233,"depth":392,"text":234,"children":395},[396,398],{"id":279,"depth":397,"text":280},3,{"id":309,"depth":397,"text":310},"Nitro provides out of the box support for deploying to Edge Workers.","md",{"icon":50},{"icon":50},{"title":84,"description":399},"TV2Ap3FnO2XbgahYlX7tro41nw9aEnCCXTo3-WSP1hs",[406,407],{"title":77,"path":78,"stem":79,"description":391,"icon":82,"children":-1},{"title":93,"path":94,"stem":95,"description":408,"icon":96,"children":-1},"Run Nitro apps with Node.js runtime.",1775117929144]