feat7 / Surface

"Surface" is an MVC based microframework written in PHP.
MIT License
8 stars 11 forks source link

Router problem. Need to access the framework from a definite URL, without URI segments. #3

Open feat7 opened 6 years ago

feat7 commented 6 years ago

Current Routing solution will generate problems if you access its root using URI segments. For example, The files of the framework will need to be accessed using root domain. http://localhost will work. But if the virtual host sframework.dev is set up at sframeworkdev folder then it needs to be the root folder.

Possible solutions: Change to some open source router solution instead of working on the router. for example AltoRouter.

kdpisda commented 6 years ago

I think must add features like running it on local php server for dev. So one may do something like in terminal in that directoryby running this command: php startserver 0:8000 The server will start on 127.0.0.1:8000. Using AltoRouter too is a great option. Will start contributing for the same soon.

feat7 commented 6 years ago

Till the router being changed, use

php -S 0.0.0.0:8000

and open

http://localhost:8000