Use same concept as Slim

Make it compatible with Apache installation and php embedded server
Close #4