Last active
August 30, 2018 17:39
-
-
Save stefansundin/5a0b5832484c7dc1f08d481e314a0e52 to your computer and use it in GitHub Desktop.
Replay production Heroku requests to your local dev environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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