Skip to content

Instantly share code, notes, and snippets.

@davestewart
Created August 25, 2014 12:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save davestewart/87ac61a871b3aee4c9be to your computer and use it in GitHub Desktop.
Save davestewart/87ac61a871b3aee4c9be to your computer and use it in GitHub Desktop.
Start Server Apple Script
# Starts server in current folder
tell application "Finder"
set currentDir to POSIX path of ((container of (path to me)) as text)
end tell
tell application "Terminal" to activate
tell application "Terminal"
do script ("cd '" & currentDir & "'")
do script ("python -m SimpleHTTPServer") in front window
end tell
tell application "Google Chrome" to open location "http://localhost:8000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment