go-project-server

Generate a Go server boilerplate combining Echo HTTP, Connect interceptors, and cmux multiplexing.

Updated Jun 4, 2025
One-click install
npx skills add https://github.com/pixb/pixai --skill go-project-server
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-project-server
Source: https://github.com/pixb/pixai/tree/main/skills/go-project-server
Command: npx skills add https://github.com/pixb/pixai --skill go-project-server

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a Go server boilerplate that combines Echo HTTP, Connect RPC interceptors, and cmux port multiplexing to run HTTP/1.1 and HTTP/2 services on a single port.

Core Features & Use Cases

  • Unified HTTP and gRPC services: build REST, gRPC, and Connect endpoints that share common business logic.
  • Clear project structure: organized server, router, and authentication components to accelerate onboarding and maintenance.
  • Production-ready lifecycle: health checks, graceful shutdown, and service registration for reliable deployments.

Quick Start

To begin, define your proto services, generate Go code, implement server.go following the provided layout, and run the application to expose HTTP/1.1, HTTP/2, and Connect routes on a single port.

Frequently Asked Questions about go-project-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run HTTP REST and gRPC on a single port in Go?

cmux multiplexes HTTP/1.1 and HTTP/2 connections on a single port, allowing Echo HTTP and gRPC services to share the same listener and run simultaneously.

What is the best way to structure a Go server with Echo and Connect RPC?

A structured Go server with Echo and Connect RPC separates routers, authentication, and server wiring, providing a clear project layout that accelerates onboarding and simplifies maintenance.

Does this Go server boilerplate support graceful shutdown and health checks?

Yes, this Go server boilerplate supports graceful shutdown and health checks, providing a production-ready lifecycle with reliable startup and shutdown processes for deployments.

Can I use Connect RPC interceptors with an Echo HTTP server in Go?

Yes, you can use Connect RPC interceptors with an Echo HTTP server in Go by registering them alongside Echo routes and gRPC services, sharing common business logic across REST and Connect endpoints.

How to generate proto code for a Go gRPC and Connect RPC server?

To generate proto code for a Go gRPC and Connect RPC server, define your proto services and use the protobuf compiler to generate the required Go code before wiring it into server.go.

Do I need generated proto code to start the Echo, gRPC, and cmux server?

Yes, you need generated proto code to start the server, as the boilerplate requires it to implement the gRPC and Connect RPC workflows defined in your service definitions.