Skip to content

Instantly share code, notes, and snippets.

@drblue
Created February 18, 2026 10:38
Show Gist options
  • Select an option

  • Save drblue/c33a048986a2f79562fff52eb955a3c9 to your computer and use it in GitHub Desktop.

Select an option

Save drblue/c33a048986a2f79562fff52eb955a3c9 to your computer and use it in GitHub Desktop.
Heroku build
#!/bin/bash
# Save the current directory
current_dir=$(pwd)
# Say hi to the user
echo "πŸ‘·πŸ»β€β™‚οΈ Hello! I'm your friendly contractor Byggare Bob and I'll be building your project. Let's get started!"
# Build the backend
echo "πŸ”¨ Building the backend..."
cd "$current_dir/backend"
npm run build
echo "βœ… Backend built successfully!"
# Build the frontend
echo "πŸ”¨ Building the frontend..."
cd "$current_dir/frontend"
npm run build
echo "βœ… Frontend built successfully!"
# Copy the Prisma query engine to the backend dist folder
echo "πŸ“¦ Copying Prisma query engine to the backend dist folder..."
cp "$current_dir/backend/generated/prisma/libquery_engine-debian-openssl-3.0.x.so.node" "$current_dir/backend/dist"
echo "βœ… Prisma query engine copied successfully!"
# Return to the original directory
cd "$current_dir"
echo "πŸŽ‰ All done! Your project has been built successfully. You can now run the backend which serves the frontend. Have a great day! πŸ‘·πŸ»β€β™‚οΈ"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment