5 ms·
My biggest problem with serverless functions is development and testing. Can I run these locally? even better offline?
by netcraft 8y ago
My biggest problem with serverless functions is development and testing. Can I run these locally? even better offline?
- k__ 8y agoAFAIK at least AWS Lambda has a Docker based CLI that lets you run functions locally. I guess since the Zeit solution is based on Docker something like this should also be possible...
- Rauchg 8y agoAs we mentioned in the blog post, there is zero difference between a `Dockerfile` you execute locally and one that you give to us. [One of the differences is performance. You'll find that we can build and execute much more quickly :)] There are many examples here: https://github.com/zeit/now-examples https://github.com/zeit/now-examples
- wereHamster 8y ago> we can build [...] much more quickly Care to elaborate? Did you write your own container builder (for example like Google did with kaniko) that you use instead of docker? If not, I fail to see how you can build faster than me locally.
- e12e 8y agoSo, I'm not running the same docker image, just something somewhat similar built from the same Dockerfile?
- arunoda 8y ago> something somewhat similar built from the same Dockerfile? Yes. We build the container based on the Dockerfile.
- sergiodxa 8y agoNow uses Docker so you just need to also use Docker to run your container, there is nothing special to do to run it in locally or offline since we don't require you an specific runtime or API. Just a normal HTTP server running inside a normal Docker container.