Created
April 13, 2015 06:20
-
-
Save shinglyu/ae8880369428f6b42845 to your computer and use it in GitHub Desktop.
dev server router for BzDeck
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
<?php | |
// This file is used for testing bzdeck with php's built-in web server. | |
// Usage: | |
// 1. php -S localhost:8000 dev-router.php | |
// 2. Visit http://localhost:8000 | |
if (basename($_SERVER["PHP_SELF"]) == 'index.html' || basename($_SERVER["PHP_SELF"]) == ''){ | |
// php's built-in server does not process html files | |
include('index.html'); | |
} else { | |
return false; // serve the requested resource as-is. | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's my modified version:
The dev server worked for me by adding this file as
dev-router.php
and renamingindex.html
toindex.php
😺