Skip to content

Add a context #197

@tcarac

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

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