exoframejs / exoframe

Exoframe is a self-hosted tool that allows simple one-command deployments using Docker
https://exoframejs.github.io/exoframe/
1.13k stars 56 forks source link

Exoframe functions #285

Closed kennetpostigo closed 4 years ago

kennetpostigo commented 4 years ago

Hey,

Was looking at some of the documentation for functions and noticed that http functions take event and context params. I was pretty confused by that, wondering why it doesn't take req and res params that most lambda functions typically take.

yamalight commented 4 years ago

@kennetpostigo because there's a way to have custom triggers that provide custom event and context, see this example

kennetpostigo commented 4 years ago

@yamalight Just some context, my team is looking to move off of now to a self hosted solution like exoframe, however all our infrastructure uses micro.

All of our lambdas, servers, and libraries on the server are centered around micro. Is there anyway I can keep using micro with exoframe long-running servers and exoframe functions?

I don't mind doing some ground work maybe creating a fork based off the exoframe functions, but i'm unsure of how to use that fork with exoframe.

yamalight commented 4 years ago

Simplest way would be to run them as simple deployments (so just dockerized node instances).

Another way would be to extend exoframe plugins to allow working with HTTP, so you could create a fork of exoframe-faas and tweak it to work with micro and then use it as a plugin (should be relatively straightforward task).

But unless you really want to keep running everything as functions, I'd recommend going with the first option - you'll get more control over deployments this way

yamalight commented 4 years ago

Closing this. Feel free to re-open if needed.