Hosting The TinaCMS Backend on Netlify Functions
If you are not using Next.js but are using Netlify to host your site, you can deploy the TinaCMS Backend as a Netlify function. This function will be responsible for handling all TinaCMS requests. This includes the GraphQL API, authentication, and authorization.
If you want to see Netlify functions in action, check out the demo repo
Configuration
Create a file called netlify/functions/tina.{ts,js} and add the following code:
Since Netlify Functions do not support catch all routes, you will need to add the following to your netilfy.toml file.
Next make sure to update your TinaCMS config to use the new endpoint.
Now you can run your site locally with the netlify dev command