serveItQuick
v1.0.0
Published
A node-php server platform with the simplest of custom router for development
Downloads
1
Readme
#serveItQuick A node-php server platform with the simplest of custom router for development. !! Works on Chrome only for now !!
#Install First, you need node.js:
Then in your terminal:
$npm install serve-it-quick
$cd serve-it-quick
$npm install
$node serve
And voila! Php server + router running on http://subdomainExample.localhost:8000
#Customize The php router file is in lib/server/router.php. To customize the router you can change the subdomains :
Set your default subdomain, where http://localhost:8000 points to
$defaultSubdomain = "subdomain-example";
Set all the valid subdomains. As default you have http://another-subdomain.localhost:8000/ also setup:
$validSubdomains = array("subdomain-example", "another-subdomain");
By default the router will look for the subdomain and the views in public/html/subdomain. Change that as needed:
$pathToWebFolder = "public/html/".$subdomain."/"; $pathToViews = "public/html/".$subdomain."/";
By default it looks for an index.html if the path does not contain a file:
if ($url["path"]=="/") { include $pathToViews."index.html"; exit; }
#Dependencies node node-php-server php if you are on windows
#License MIT