NuxtN
Nuxt15mo ago
bnason

AsyncLocalStorage server side

I've been looking at the documentation for the experimental feature asyncContext. I'm confused if this is a client side only feature or if it's supposed to work server side to? My understanding was AsyncLocalStorage was on the node side, not the browser side. I'm trying to use it in a server side util to get some data from the db with the logged in user information but useNuxtApp is undefined there. I'm not exactly sure what to use. I'm calling this from a defineEventHandler api route which I thought it should work in.
Was this page helpful?