Dynamic (extensible) routing?

23 views
Skip to first unread message

Carlos Paparoni

unread,
Feb 20, 2015, 10:58:57 AM2/20/15
to chica...@googlegroups.com
Hi all, I'm currently thinking about how to do dynamic routing in a CB app (i.e.: based on a config/database-saved option).

Currently the app's routes are written statically in <app>/priv/<app>.routes, but what if I wanted to add/modify routes without modifying that file? Can it be done? Would core CB code have to be modified in order to do that, or can it be achieved in the controller (via a "catch-all" route pointing to a routing method)?

Nicolas Michel

unread,
Feb 23, 2015, 8:00:49 AM2/23/15
to chica...@googlegroups.com
Hi,

Maybe you should consider having a look at the "filter" feature of CB : https://github.com/ChicagoBoss/ChicagoBoss/blob/master/README_FILTERS.md

regards,

Nicolas -

2015-02-20 16:58 GMT+01:00 Carlos Paparoni <carlos....@gmail.com>:
Hi all, I'm currently thinking about how to do dynamic routing in a CB app (i.e.: based on a config/database-saved option).

Currently the app's routes are written statically in <app>/priv/<app>.routes, but what if I wanted to add/modify routes without modifying that file? Can it be done? Would core CB code have to be modified in order to do that, or can it be achieved in the controller (via a "catch-all" route pointing to a routing method)?

--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/c614ac6c-6a25-4d52-adc9-adc4ee673c4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages