Writing my first Netlify functions

Some things to consider - development and deployment

During development

  • The function filenames are used to auto-magically configure the automated triggers (function trigger docs)
  • During development, you can use the netlify CLI to invoke functions see - netlify functions:invoke or netlify functions:serve
  • Environment variables are managed from within the Netlify dashboard. They are not read from .env.local, and they are not updated till you restart the dev server
  • Debugging - Is there a better way to debug than using console.log?

Deploying

Some things to think about:

  • Functions are deployed to AWS us-east-1 (docs). How to go about multi-region deployments?
  • Logging -The Netlify dashboard provides basic access to recent logs. You'll need a (paid) log drain in order to access the logs programmatically.
  • Monitoring - not sure how this can be done

Sign up for my tips newsletter

Always be Learning.