nitro
nitro copied to clipboard
Provider `NITRO_CLUSTER_ID` and `NITRO_CLUSTER_PRIMARY`
Related to https://github.com/nuxt/nuxt/issues/20882 (and https://github.com/unjs/nitro/issues/1281)
In a cluster environment, we might want to run a plugin or logic only in first instance. For this, we need to check if the worker is primary (first one).