Hey look, an API written in GO on Google Cloud Run with a Postgres Database.
Use the Google Cloud SQL Auth Proxy
DB_USER=hapi
DB_PASSWORD=xxxxUse the Google Cloud SQL Connection String via UNIX sockets
CLOUD_SQL_INSTANCE=xxx
DB_USER=hapi
DB_PASSWORD=xxxxUse gcloud auth to authenticate with Google Cloud
gcloud run deploy api \
--source . \
--project hapi-9cd84 \
--region us-central1 \
--allow-unauthenticated// Todo - secure export request
POST http://localhost:8080/export
Request body:
{
"endpoints": [
{
"id": 1,
"name": "API Alerts",
"url": "https://api.apialerts.com/health/cron",
"method": "GET",
"isActive": true,
"slowThresholdMs": 500,
"createdAt": 0
},
{
"id": 2,
"name": "Stripe",
"url": "https://api.stripe.com/healthcheck",
"method": "GET",
"isActive": true,
"slowThresholdMs": 200,
"createdAt": 0
}
]
}Response Body:
{
"code": "5OMRDTSE",
"expiresAt": "2025-12-29T12:42:34.058193313Z"
}GET http://localhost:8080/import/5OMRDTSE
Response:
{
"endpoints": [
{
"id": 1,
"name": "API Alerts",
"url": "https://api.apialerts.com/health/cron",
"method": "GET",
"isActive": true,
"slowThresholdMs": 500,
"createdAt": 0
},
{
"id": 2,
"name": "Stripe",
"url": "https://api.stripe.com/healthcheck",
"method": "GET",
"isActive": true,
"slowThresholdMs": 200,
"createdAt": 0
}
]
}