Skip to content

Commit

Permalink
add link to finished GitHub repo
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil1712 committed Aug 6, 2024
1 parent 0ea3f4c commit 3a36026
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions content/d1/tutorials/build-an-api-to-access-d1/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
updated: 2024-07-31
updated: 2024-08-06
difficulty: Intermediate
content_type: 📝 Tutorial
pcx_content_type: tutorial
Expand Down Expand Up @@ -387,4 +387,6 @@ $ curl -H "Authorization: Bearer YOUR_API_KEY" "https://WORKERS_URL.workers.dev/

## Conclusion

In this tutorial, you created an API that interacts with your D1 database. You deployed this API to the Workers. You can use this API in your external application to execute queries against your D1 database. You can check out a similar implimentation that use Zod for validation in [this GitHub repository](https://github.com/elithrar/http-api-d1-example). If you want to build an OpenAPI compliant API for your D1 database, you should use the [Cloudflare Workers OpenAPI 3.1 template](https://github.com/cloudflare/workers-sdk/tree/main/templates/worker-openapi).
In this tutorial, you created an API that interacts with your D1 database. You deployed this API to the Workers. You can use this API in your external application to execute queries against your D1 database. The full code for this tutorial can be found on [GitHub](https://github.com/harshil1712/d1-http-example/tree/main).

You can check out a similar implimentation that use Zod for validation in [this GitHub repository](https://github.com/elithrar/http-api-d1-example). If you want to build an OpenAPI compliant API for your D1 database, you should use the [Cloudflare Workers OpenAPI 3.1 template](https://github.com/cloudflare/workers-sdk/tree/main/templates/worker-openapi).

0 comments on commit 3a36026

Please sign in to comment.