-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a vscode tasks file to start the PHP builtin server
- Loading branch information
1 parent
e71aa69
commit 5ee55f0
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "launch-browser", | ||
"type": "shell", | ||
"windows": { | ||
"command": "${command:workbench.action.terminal.sendSequence}", | ||
"args": [ | ||
{ | ||
"text": "start http://localhost:8000\n" // For Windows | ||
} | ||
], | ||
"problemMatcher": [] | ||
}, | ||
"linux": { | ||
"command": "/bin/bash", | ||
"args": [ | ||
"-c", | ||
"if grep -q microsoft /proc/version; then powershell.exe Start-Process http://localhost:8000; else xdg-open http://localhost:8000; fi" | ||
], | ||
"problemMatcher": [] | ||
}, | ||
"osx": { | ||
"command": "open http://localhost:8000", // For macOS | ||
"problemMatcher": [] | ||
} | ||
}, | ||
{ | ||
"label": "php-server", | ||
"type": "shell", | ||
"command": "PHP_CLI_SERVER_WORKERS=2 php -S localhost:8000", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"dependsOn": [ | ||
"launch-browser" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters