Netlify has Netlify Functions which allow you to write what are essentially lambda functions trivially in the same code-base as your frontend application.
Configuring the token
Given we’re authenticated with the CLI, we can easily set the Netlify environment variable from the command line.
You could do this instead on the Netlify Dashboard, and you can read more about environment variables in the Netlify docs
Examples
Below are some basic examples to get you started.
Using the Go SDK
Below is an example for utilising the Go SDK on a Netlify Function
Using the TypeScript SDK
Below is another example of using the TypeScript SDK within a Netlify Function.