Skip to content

Instantly share code, notes, and snippets.

@hideyukisaito
Created August 27, 2015 07:15
Show Gist options
  • Save hideyukisaito/856ef529d5bb77b88266 to your computer and use it in GitHub Desktop.
Save hideyukisaito/856ef529d5bb77b88266 to your computer and use it in GitHub Desktop.
Finder で指定したフォルダをルートとしてローカルサーバを起動する ref: http://qiita.com/hideyukisaito/items/03c46c075151947f3569
on run {argv}
display dialog "Enter port number" default answer "8888"
set targetPort to text returned of result
tell application "Terminal"
set currentTab to do script "cd " & (argv)'s POSIX path
delay 1
do script "php -S localhost:" & targetPort in currentTab
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment