Skip to content

Are there any examples with multiple functions? #299

Open
@christopher-caldwell

Description

@christopher-caldwell

All the examples I can find using this are only using one function. Are there any examples using many functions, with TypeScript, Webpack, ESBuild, etc?

Issues

There's some questions I cannot seem to find the answer for:

  • Is Google the one enforcing no slashes, or is it this lib?
    • I cannot really use a package.json for multiple functions, ther'es only one main key
    • Do I re-export these functions into a barrel file? If so, what do the keys look like in the serverles file?
    • Is there a reason the handler key cannot function the same way as AWS? It's so much more flexible to do src/thing/other-thing/index.handler
  • Is there supposed to be one serverless file per function? If so, how do you like them in a single deploy command?
  • Do the exports have to be named http and event?

I would be happy to create some and add them as docs, but I cannot seem to get it working with the aforementioned tools.

What I've Found

While this is nice, it doesn't quite scale. How does package work in this context? There doesn't seem to be anything transforming the TS that I can see.

Goal

  • Get some examples working with many functions, using build tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions