By moad
What is the recommended way of working locally on a project meant to be used as a Function ? I don’t want to have to deploy every time, I want to be able to run (simulate how DO runs the Function), pass my args and be able to run tests before I deploy. How can I achieve this LOCALLY (without deploying anything to DO) ? Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey @driftingazurecrab,
Currently the recommended way of doing this is to use the development workspace using doctl as described here:
https://docs.digitalocean.com/products/functions/how-to/develop-functions/
Once the function is ready, then you deploy it to the App Platform. That way you will be sure that the function works the way that you want it to behave on the DigitalOcean infrastructure.
If this does not match your needs, the best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.
Hope that helps!
- Bobby.
I’ve found success by building my function locally as a single file, and using doctl sls watch <dir> to continually deploy the function when it changes. By skipping the remote build it’s a super fast deployment. Use doctl serverless activations logs --follow to see logs. Then I can develop on the remote function but it is fast, and feels like local development.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.