This template project provides a streamlined setup for developing web backend APIs using Go, gqlgen, and sqlc. With built-in integrations for database migrations and task management, it simplifies the process of building and testing modern web applications, allowing for a focus on delivering features.
The go-gql-sqlc-template serves as a robust template project designed for creating Web Backend APIs using a powerful tech stack. This repository leverages several modern tools to streamline development, including:
This template streamlines the API setup process with commands for initializing, starting, and testing the backend service. For example, the command to start the API is:
$ task up
Followed by database migration with:
$ task migrate
The project includes options for running tests and integration tests seamlessly. Testing can be executed using:
$ task test
In terms of development, the template offers utilities for generating API interfaces directly from the GraphQL schema and ORM code from SQL statements. Commands for these operations include:
$ task gql-gen
$ task sqlc-gen
The template also provides commands for database operations, including migration and rollback functionalities:
$ task migrate
$ task rollback
This comprehensive setup allows developers to focus on building features without the distractions often associated with boilerplate configurations, making it an efficient starting point for any Go-based web backend project.
No comments yet.
Sign in to be the first to comment.