Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running these functions locally #39

Open
matthewmueller opened this issue Jan 22, 2017 · 1 comment
Open

Running these functions locally #39

matthewmueller opened this issue Jan 22, 2017 · 1 comment

Comments

@matthewmueller
Copy link

matthewmueller commented Jan 22, 2017

I saw from another issue that you can't really run these functions locally. What would it take to make that happen? Hard to beat the dev flow of:

go run functions/auth/main.go < event.json

Will probably work on this if it's feasible :-)

@tj
Copy link
Member

tj commented Jan 22, 2017

The main reason it would be awkward locally is you'd have to build the zip each time, and unzip it each invoke too, so it's super slow. Also only the shimmed ones accept events over stdin so it would be different for python/node which is tricky too (for node it would have to node -e 'require('path').handle(event)' or something weird).

Ultimately I think there's no replacement for just writing tests and libraries instead :D if anything I think the lack of this feature might be a good thing that way, it kind of forces you to write tests. I think that helps discourage people from writing too much logic in the functions themselves too, where it really doesn't belong IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants