{"repo":"walterwanderley/sqlc-http","free":true,"listed":false,"github":"https://github.com/walterwanderley/sqlc-http","clone":"git clone https://github.com/walterwanderley/sqlc-http.git","description":"Generate net/http go server from SQL","language":"Go","stars":23,"topics":["http","mysql","postgresql","sqlc","sqlite"],"license":"MIT","category":"databases-storage","readme_excerpt":"sqlc-http Create a net/http Server from the generated code by the awesome sqlc project. If you’re searching for a SQLC plugin, use sqlc-gen-go-server. Requirements - Go 1.26 or superior Installation Fullstack application example (HTMX) If you want to generate a complete application (including htmx frontend), check this example. High Availability SQLite Applications For SQLite-based applications, the generated code leverages the go-ha driver to enable high availability and fault tolerance. Example 1. Create a queries.sql file: 2. Create a sqlc.yaml file 3. Execute sqlc-http If you want to generate the frontend (htmx): 4. Run the generated server 5. Enjoy! If you do not generate the frontend in step 4? - Swagger UI: http://localhost:5000/swagger If you generate the frontend in step 4: - HTMX frontend: http://localhost:5000 - Swagger UI: http://localhost:5000/static/swagger Customizing HTTP endpoints You can customize the HTTP endpoints by adding comments to the queries. Here’s an example of a queries file that has a custom HTTP endpoint: Editing the generated code - It's safe to edit any generated code that doesn't have the DO NOT EDIT indication at the very first line. - After modify a SQL file, execute the command below: Similar Projects - sqlc-connect - sqlc-grpc - xo-grpc","default_branch":null,"files":null,"tree":[],"storefront":"/r/walterwanderley","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/walterwanderley/sqlc-http/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}