mirror of https://github.com/flarum/flarum
				
				
				
			launch.php addition and readme.md changes
							parent
							
								
									67d0c7606a
								
							
						
					
					
						commit
						9367bdb137
					
				| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
<?php
 | 
			
		||||
$uri = urldecode(
 | 
			
		||||
    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
 | 
			
		||||
);
 | 
			
		||||
$tokens = explode('/', $uri);
 | 
			
		||||
$handler = __DIR__.'/'.$tokens[1].'.php';
 | 
			
		||||
if ($uri !== '/' && file_exists(__DIR__.'/'.$uri)) {
 | 
			
		||||
    // If requesting the root page, or raw files/folders
 | 
			
		||||
    // Return as is
 | 
			
		||||
    return false;
 | 
			
		||||
} elseif (file_exists($handler)) {
 | 
			
		||||
    // This is for /api and /admin
 | 
			
		||||
    include_once $handler;
 | 
			
		||||
} else {
 | 
			
		||||
    include_once __DIR__.'/index.php';
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,3 +1,12 @@
 | 
			
		|||
#### How to launch with one command?
 | 
			
		||||
 | 
			
		||||
* Step 1: `composer install`
 | 
			
		||||
* Step 2: `php -S localhost:9999 launch.php`
 | 
			
		||||
 | 
			
		||||
`launch.php` is a custom script that gives you a reproducable development environment. 
 | 
			
		||||
##### By Ali Gajani 
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
**[Flarum](http://flarum.org) is free, open-source forum software** built with PHP and [Mithril.js](http://mithril.js.org). It is:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue