2. Middleware
   You can create custom server middleware to handle specific tasks like logging,
   authentication, or modifying requests and responses. For example, create a
   logging middleware in server/middleware/logger.ts:

   Server middleware allows you to run custom logic before requests reach your API routes or other server handlers. Middleware is defined in the server/middleware/ directory.

   export default defineEventHandler((event) => { console.log('Incoming request:', event.node.req.url); });

3. Error Handling
   Centralize error handling using middleware to catch and handle errors gracefully. For example, an error handler in server/middleware/errorHandler.ts:
   export default defineEventHandler((event) => {
   try {
   // Handle your logic here
   } catch (err) {
   event.res.statusCode = 500;
   event.res.end('Something went wrong!');
   }
   });
