DieSchittigs / contao-content-api-bundle

Contao JSON-API
MIT License
41 stars 9 forks source link

Own Route #1

Closed christianromeni closed 7 years ago

christianromeni commented 7 years ago

Would that not be the exact usecase where to use a custom route in the /app/config/routing.yml file instead of adding a new file to the /web directory? Just imagine all the nginx users who can not use the htaccess example you are giving ;)

saibotd commented 7 years ago

Sounds good! I'll have a look at it - still figuring out all the Symfony-related stuff, so if you have more suggestions to make this lib more symfony-iy, I'm open for advice.

saibotd commented 7 years ago

I'm currently migrating the code into a Symfony Bundle. It'll use a routing.yml and an annotated Controller, so this can be closed with the next release

christianromeni commented 7 years ago

Nice! ;)

saibotd commented 7 years ago

Routes are now defined in the bundle. The .htaccess Example is for routing stuff to your js-App, I don't think there's a clever way to manage this in contao/symfony …