rin on Nostr: > need to query an API once a minute at work and do some lite (~100 loc) data ...
> need to query an API once a minute at work and do some lite (~100 loc) data processing
< well, I don't want to manage a server, so how about I try a serverless function
> to run a google cloud function periodically you need to create a pubsub channel for your function, and send events into it using cloud scheduler
< wait but what about the API token
> it's not recommended to store it in cloud environment variables, create a secrets manager and access it in the code
real over engineering hours
Published at
2024-06-20 11:44:34Event JSON
{
"id": "979e8d5780ac62390519146860e9623f87666086932dd007f30fa4473ba3dfbc",
"pubkey": "cee7e2efd8765a5a33de7afac184a7306dd636144c5be149277099c0780a5124",
"created_at": 1718876674,
"kind": 1,
"tags": [
[
"proxy",
"https://post.ebin.club/objects/4e04ac29-22d9-4a18-a011-b4859c91da91",
"activitypub"
]
],
"content": "\u003e need to query an API once a minute at work and do some lite (~100 loc) data processing \n\u003c well, I don't want to manage a server, so how about I try a serverless function\n\u003e to run a google cloud function periodically you need to create a pubsub channel for your function, and send events into it using cloud scheduler\n\u003c wait but what about the API token\n\u003e it's not recommended to store it in cloud environment variables, create a secrets manager and access it in the code\n\nreal over engineering hours",
"sig": "44243dab198b46f47c6e2f8a74e87002881e7ec77fb7658fb6594e1ad24016cd093fe4bfa85b50f7c7b653f7533bf04d387126c7ecb8c0db5408011ec966baf9"
}