That’s where Netlify Functions come in.
What are Netlify Functions?
Functions are scripts that you can write and deploy directly on Netlify. These functions are hidden from public view, but can be interacted with like any other API service. As with your site code, Netlify takes care of deploying your scripts into functions.
Who’s it useful for?
Netlify Functions are useful for developers who want to add more functionality to their site and don't want to use, or can't rely entirely on, third-party APIs. Functions are also a great way to keep API credentials private, because they're hidden from public view.
Why use it?
- Interact with protected APIs
- Interacting with databases
- Accessing payment services
- Using secret API keys
- Run libraries that only work on the backend
- Manipulate data
- Running large processes such as image manipulation
Functions are great for cases like this. They act like your own custom API and only run when you request for them, returning the data you need on a on-demand basis.
Want to learn more? Head on over to the Netlify Functions product page.