Create a gist now

Instantly share code, notes, and snippets.

Embed
Replay production Heroku requests to your local dev environment.
#!/bin/bash -e
app=rssbox
dev=http://rssbox.dev
heroku logs -t -s heroku -d router -a $app | {
while IFS= read -r line
do
path=$(echo $line | grep -oE 'path="([^"]+)"' | cut -d'"' -f2)
code=$(curl -s -o /dev/null -w "%{http_code}" "$dev$path")
echo "$(date +%T) $code $dev$path"
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment