Workers
Nitro provides out of the box support for deploying to Edge Workers.
Deploy to Workers
Nitro provides out of the box support for deploying any Nitro app to different Edge Worker offerings as well as Service Workers.
- Cloudflare
- Deno
- Vercel
- Netlify
- Lagon
- Browser Service Workers (via experimental preset
service-worker
)
Limitations
Deploying to edge workers has some limitations. See limitations for more details.
Deploying to edge workers has some limitations. See limitations for more details.
Limitations
- No support for raw TCP/IP traffic
- Execution time is limited compared to classic serverless offerings (normally 15-30 seconds)
- No access to the filesystem (use the nitro storage layer)
- Bundle size is very limited (normally a few MBs)
- Limited access Node.js APIs (nitro provides compatibility layer via unjs/unenv)
Incompatible libraries
Help us
If you come across a library that you assume to be incompatible with edge workers, please open an issue on the nitro repo and help us keeping this list up to date.
If you come across a library that you assume to be incompatible with edge workers, please open an issue on the nitro repo and help us keeping this list up to date.
The following libraries are known to be incompatible with edge workers because of one of the above mentioned limitations:
mongodb
There are possible fixes for MongoDB, like using Realm and the Realm SDK or using http interfaces (only available when self hosting MongoDB), but these are untested. You can find an example for using realm here
mysql
You can find an example with a modified MySQL driver here
rhea
gremlin
ioredis
cassandra-driver
kafkajs