Go + GORM + SQLite Example
Minimal example demonstrating NVOI deployment.
What It Does
- Visit
/ â Creates random user â Returns all users
- Visit
/health â Health check
- Database persists across deployments
Prerequisites
- Own a domain and add it to Cloudflare DNS
- Hetzner Cloud account
- Run
make build from project root
Deploy
cp .env.example .env
vim .env
vim deploy.yml
make example-deploy
Test
curl https://yoursubdomain.yourdomain.com/
curl https://yoursubdomain.yourdomain.com/health
Local Test
make example-run
curl http://localhost:3000/
Response Example
{
"message": "User created on this visit!",
"new_user": {
"id": 1,
"name": "Alice Smith",
"email": "user1699999999@example.com"
},
"total_users": 1,
"all_users": [...]
}