Skip to content

Instantly share code, notes, and snippets.

@bgrins
Last active November 23, 2022 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgrins/c58973b01ca572581af3bde2e783f532 to your computer and use it in GitHub Desktop.
Save bgrins/c58973b01ca572581af3bde2e783f532 to your computer and use it in GitHub Desktop.
# Automatically restart datasette when a db file changes
sh -c '$PWD/scripts/restart-datasette.sh &' && fswatch -o fixtures.db | xargs -n1 -I{} sh -c '$PWD/scripts/restart-datasette.sh &'
lsof -ti tcp:8080 && kill -9 $(lsof -ti tcp:8080) && echo "Killed server on 8080"
datasette -p 8080 fixtures.db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment