Skip to content

Instantly share code, notes, and snippets.

@shanejonas
Created February 2, 2015 02:41
Show Gist options
  • Select an option

  • Save shanejonas/b903f7f3d0d8b6b3d963 to your computer and use it in GitHub Desktop.

Select an option

Save shanejonas/b903f7f3d0d8b6b3d963 to your computer and use it in GitHub Desktop.
#!/bin/bash
while ! curl http://$DB_HOST:$DB_PORT/
do
echo "$(date) - still trying"
sleep 1
done
echo "$(date) - connected successfully to mongodb"
node server.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment