Documentation Index
Fetch the complete documentation index at: https://docs.shardcloud.app/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
This guide covers deploying Gin applications on Shard Cloud. Gin is a high-performance HTTP web framework for Go.Creating Your Project
Ensure you have Go installed. Download from go.dev.Initialize Project
Basic Gin Application
Create amain.go file:
main.go
Gin listens on port 80 which is required for web applications on Shard Cloud.
Building Your Application
Go applications must be compiled before deployment:app that can run on Shard Cloud.
Shard Cloud Configuration
Create a.shardcloud file:
.shardcloud
Go applications are memory-efficient. 256MB is often sufficient for simple APIs.
Deploying
Build Your Application
Run
GOOS=linux GOARCH=amd64 go build -o app main.go to create the Linux binary.Upload to Shard Cloud
Go to Shard Cloud Dashboard and upload your project.
Advanced Example: REST API with Routes
main.go
Additional Resources
Visit the official Gin documentation for more information.Troubleshooting
Binary won't execute
Binary won't execute
Ensure you compiled with
GOOS=linux GOARCH=amd64 for the Shard Cloud environment.Port already in use
Port already in use
Make sure your application uses port 80.