Drop puma-dev in favor of localhost

This commit is contained in:
Jeffrey Hardy
2024-09-06 16:28:51 -04:00
parent 77c4922fd5
commit bbb394db02
2 changed files with 11 additions and 15 deletions
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
echo "Starting Fizzy on http://localhost:3006"
echo "Login with david@37signals.com using secret123456"
exec ./bin/rails server -p 3006
+5 -15
View File
@@ -1,26 +1,21 @@
#!/usr/bin/env bash
set -eo pipefail
app_root="$( cd "$(dirname "$0")/.."; pwd )"
app_name="fizzy"
# Use application binstubs
export PATH="$app_root/bin:$PATH"
export PATH="./bin:$PATH"
announce() {
echo
echo "--- $@"
printf "\n--- $@\n"
}
announce "Installing dependencies"
gem install bundler --conservative
bundle check || bundle install
announce "Preparing database"
if [[ $* == *--reset* ]]; then
announce "Recreating database"
rails db:reset
else
announce "Preparing database"
rails db:prepare
fi
@@ -30,10 +25,5 @@ rails log:clear tmp:clear
announce "Restarting services"
rails restart
if [ -d "$HOME/.puma-dev" ]; then
announce "Configuring puma-dev"
ln -nfs "$app_root" "$HOME/.puma-dev/$app_name"
announce "Checking https://$app_name.test/up"
curl -Is "https://$app_name.test/up" | head -n 1
fi
echo
echo "Start developing with ./bin/dev"