Rank 2: Process
First I am not sure how to send the JWT to the nitro api, secondly I am not sure how to actually create the client, is it good practice to create it in a middleware? wouldn't that slow everything down?
export default defineEventHandler((event) => { event.context.appwrite = new sdk.Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID .setJWT(jwt); // Your secret JSON Web event.context.account = new sdk.Account(event.context.appwrite); })