1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-28 17:29:36 +02:00
AdventureLog/startup.sh

28 lines
501 B
Bash
Raw Normal View History

#!/bin/sh
# Function to check if the database is ready
wait_for_db() {
echo "Waiting for the database to start up..."
while ! nc -z db 5432; do
sleep 1
done
echo "Database is now available."
}
# Start your application here
# Example: node build/index.js
# Print message
echo "Starting AdventureLog"
# Wait for the database to start up
wait_for_db
2024-04-10 01:31:10 +00:00
# generate the schema
npm run generate
# Run database migration
npm run migrate
# Start the application
node build/index.js