Skip to content

Add a context #197

Description

@tcarac

Hey, im loving lambda-api so far.
Quick question, is there a way to add a context to handlers ?
Let's say

app.get("/posts", getPosts);
async function getPosts(req,res,context){
const prisma = context.prisma;
return prisma.posts.findMany({});
}

And this is basically for code splitting

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions