sudo systemctl restart myapp && sleep 3 && curl -sf http://localhost:3000/health && echo DEPLOY_OK

Category: VPS Management

sudo systemctl restart myapp && sleep 3 && curl -sf http://localhost:3000/health && echo DEPLOY_OK

Restart app and verify health endpoint

The deploy acceptance test: restart the service, wait 3 seconds for startup, then curl the health endpoint with -sf (silent, fail on error) so a non-200 response aborts the chain — DEPLOY_OK prints only when the app is genuinely up. Extend the sleep for slower boots. This turns 'it restarted' into 'it works'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.