Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added router to support built-in PHP web server #1218

Closed
wants to merge 1 commit into from

Conversation

ftrrtf
Copy link

@ftrrtf ftrrtf commented Dec 16, 2016

I was surprised when I saw that there is no way to run grav on the built-in server, which is ideal for development, 'cos grav doesn't need a database, etc. So I'm a little researched this issue and found a solution.
Used for the past several months for me, no any problems noticed, everything works as well.

How to run:

php -S localhost:8000 router.php

Related issues:
getgrav/grav-plugin-admin#2
getgrav/grav-plugin-admin#3

@flaviocopes
Copy link
Contributor

The problem is not that Grav does not run on the built-in webserver. It does, and it works fine.

But Admin, and some other plugins, do not because of getgrav/grav-plugin-admin#3 (comment).

We therefore added a check inside Admin to prevent it to run on the built-in webserver.

BUT your solution makes it work, very nice! Just not sure if / how to handle this, as people do not always read the documentation before firing the built-in webserver, so we'll get those problems back when they run php -S localhost:8000. Maybe we could have this documented somewhere, we point out to this in the error we give, and we add a setting to unlock the built-in webserver in the admin config yaml.

@rhukster
Copy link
Member

Thanks for this PR @ftrrtf, i've made a few minor modifications to ensure this can't be run without the router. Please check my PR: #1219

If it's all good for you we can merge that one.

@ftrrtf
Copy link
Author

ftrrtf commented Dec 16, 2016

@rhukster 👍

@rhukster
Copy link
Member

Closing this one.. please move discussions to #1219

@rhukster rhukster closed this Dec 16, 2016
flaviocopes pushed a commit that referenced this pull request Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants