From Prompt to Live Endpoint on Free Tiers
说明与用途
在MonkeyCode免费服务器上创建、验证并部署URL健康检查脚本的分步流程,确保及时发现故障。
问题
Small services on free tiers often fail silently at night, causing silent downtime.
结果
The workflow demonstrates that a simple, spec‑driven script can be generated, verified locally, and deployed to a free server, providing reliable health checks with clear failure signals.
工作流
- Write a concise spec file (spec.py) describing inputs, actions, outputs, and exit conditions.
- Prompt the model with the spec to generate a draft script (healthcheck.py).
- Review the draft line‑by‑line for error handling, timeouts, and exit logic.
- Run the script locally with a controlled URL list and verify output and exit code.
- Modify the URL list to a dead port to confirm the script exits non‑zero on failure.
- Deploy the verified script to the free MonkeyCode server with a cron schedule using the CLI.
- Wait for the first run, then query the public endpoint to confirm server behavior.
证据
The script exits non‑zero when any URL returns 5xx.
Deploy to the free server runs the script on a schedule.
- 记录日期: 2026-09-08T01:37:54.115Z