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

feat(console): ensure tempest serve supports routes with file extension #704

Merged

Conversation

blackshadev
Copy link
Contributor

What

  • extends tempest serve with a router script to control what it will serve as static file and what will continue through tempest
  • The old/current implementation doesn't allow routes with known file extensions (eg .json) to hit tempest even if the file does not exist

How to test

  • Add an route #[Get('/example/{file}')] to a known controller
  • run tempest serve and try accessing the route through curl http://localhost:8000/example/my_file.json
    • On my branch this will work
    • On main this will result in a 404 (given that example/my_file.json doesn't exist)

@blackshadev blackshadev changed the title feat(console): Ensure serve supports routes with file extension feat(console): ensure serve supports routes with file extension Nov 8, 2024
@blackshadev blackshadev force-pushed the feat/dev-serve-support-file-extensions branch from 1ebf2aa to 1e28e16 Compare November 8, 2024 21:13
@innocenzi innocenzi changed the title feat(console): ensure serve supports routes with file extension feat(console): ensure tempest serve supports routes with file extension Nov 9, 2024
@brendt brendt merged commit 6300617 into tempestphp:main Nov 9, 2024
58 checks passed
@brendt
Copy link
Member

brendt commented Nov 9, 2024

Nice, thanks! Ideally we add some tests for this, feel free to take a stab at it if you want to: #708

I can take care of it as well btw, no problem

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.

2 participants