Add some more docs and streamline entrypoint

This commit is contained in:
Mike Conrad
2025-06-11 17:08:21 -04:00
parent 78f32b4384
commit 8327d34708
6 changed files with 52 additions and 3 deletions

View File

@ -0,0 +1,23 @@
#!/bin/sh
echo "starting up..."
node ace generate:key
# Check for pending migrations by parsing output
PENDING_MIGRATIONS=$(node ace migration:status | grep -ic 'pending')
# Run migrations only if there are pending ones
if [ "$PENDING_MIGRATIONS" -gt 0 ]; then
echo "Found $PENDING_MIGRATIONS pending migration(s). Running migrations..."
node ace migration:run --force
else
echo "No pending migrations."
fi
echo "Seeding database..."
node ace db:seed
# Start the dev server
node ace serve --watch