This is a small project that you can server your api to integrate with CloudFlare Serverless Function
src/index.js
is the content of the Workers script.
To generate using wrangler
wrangler generate projectname https://github.com/cloudflare/worker-template
Further documentation for Wrangler can be found here.