Forwarding to another router like with Plug

438 views
Skip to first unread message

Sébastien Merle

unread,
May 8, 2015, 11:28:50 AM5/8/15
to phoeni...@googlegroups.com
Hi,

how is it possible to forward from a router to another like with Plug.Router forward/2 ?

I have a root rooter that should forward to other routers for web or api, I want do do something similar to:

defmodule MyApp.Router do
  use Phoenix.Router
  forward "/api", to: MyApp.API.Router
  forward "/", to: MyApp.Web.Router
end


Thank you.

Regards,
Sebastien Merle.

Chris McCord

unread,
May 8, 2015, 11:33:36 AM5/8/15
to phoeni...@googlegroups.com
You can plug routers (since they are just plugs), but we don’t have full support for cascading routes (yet). The idea is to allow cascading routes in the endpoint, i.e.:

    plug :router, MyApp.Router
    plug :router, MyApp.Router2




--
You received this message because you are subscribed to the Google Groups "phoenix-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phoenix-talk...@googlegroups.com.
To post to this group, send email to phoeni...@googlegroups.com.
Visit this group at http://groups.google.com/group/phoenix-talk.
To view this discussion on the web visit https://groups.google.com/d/msgid/phoenix-talk/d248377f-c953-4d0e-b6b1-099b9cda9695%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris McCord

unread,
May 8, 2015, 11:34:16 AM5/8/15
to phoeni...@googlegroups.com
Your example falls nicely into router pipelines though. You’ll have a `:browser` pipeline and an `:api` pipeline (the default names we use).

On May 8, 2015, at 11:28 AM, Sébastien Merle <s.m...@gmail.com> wrote:

Sébastien Merle

unread,
May 8, 2015, 11:57:35 AM5/8/15
to phoeni...@googlegroups.com
Yes, I am using the pipeline for now and it is working.
I was just trying to make the API and the web code more independent.
For example, because this router is global it cannot do use MyApp.Web, :router  or use MyApp.API, :router  it has to stick with use Phoenix.Router .

Another thing that is not clear to me is how to handle errors (404, 500...) differently for the `:browser` and `:api` pipelines.

Ryan Winchester

unread,
Jun 16, 2017, 12:23:06 AM6/16/17
to phoenix-talk
but we don’t have full support for cascading routes (yet

How about now?

OvermindDL1

unread,
Jun 16, 2017, 10:50:31 AM6/16/17
to phoenix-talk
I embed Routers via use macro's and/or `forward`.  What are you trying to accomplish specifically?

nic...@gmail.com

unread,
May 3, 2018, 10:51:31 AM5/3/18
to phoenix-talk
Could you post a code snippet of what embedding a router within a router looks like?
Thanks.

DRfrankrandy whatsapp:+13803904304

unread,
Oct 7, 2018, 3:37:05 PM10/7/18
to phoenix-talk
BUY HIGH QUALITY COUNTERFEIT CURRENCIES MONEY (WHATSAPP +13803904304)AND PASSPROT,ID,DL AND VISA
EUROS,DOLLARS AND POUNDS AND NOVELTY DOCUMENTS LIKE PASSPORTS,ID CARDS,GREEN CARDS AND
DRIVERS LICENSE.AND S.S.D CHEMICALS.

Warmest greetings to everyone in this forum. Take the chance now to become rich and have some money to buy school stuffs,pay your loans, hospital bills, utility bills and all your bills. Take your time to read this post/article before you buy from me. We are the best producer of authentic counterfeit Banknotes, Novelty and high quality passports, driver license,ID cards, green card, certificates, Diploma documents. With over a billion of our products circulating around the world. We offer only original high-quality counterfeit currency notes and fake documents. This bills are not home made but industrial and professional manufacturing. From High Quality IT technicians from US,Russia,Korea and China We offer high quality authentic counterfeit for the following currencies;

Email:………… randyj...@gmail.com

WhatsApp: +13803904304



WE HAVE SSD SOLUTION TO CLEAN DARK MONEY AND MAKE IT USEFUL

Our notes are AAA+ grade Quality. Our bills have features like

-Holograms and Holographic Strips
-Micro-Lettering
-Metallic Ink and Thread
-Watermarks
-IR Detection
-Ultra-violet features
-See through Features
-Different serial numbers

These features make our bills to be 100% undetected,100% safe and secure to use in any of these areas: BANKS, CASINO, ATM, MONEY CHANGERS, STORES. They are 100% Undetected.

KEYWORDS BUY HIGH QUALITY COUNTERFEIT MONEY HERE:

EUR — Euro
USD — US Dollar
DNR — DINAR
GBP — British Pound
INR — Indian Rupee
AUD — Australian Dollar
CAD — Canadian Dollar
AED — Emirati Dirham
ZAR — Rand
CHF — Swiss Franc
CNY — Chinese Yuan Renminbi
MYR — Malaysian Ringgit
THB — Thai Baht
NZD — New Zealand Dollar
SAR — Saudi Arabian Riyal
QAR — Qatari Riya

Buy Super notes, they pass all ATM machines and can be deposited into any bank. they come with all security features. they pass both the Iodine pen test ,UV light test, and the marker check.

AND MANY MORE………. ………………………………….-………………………………….-…………….

counterfeit Euro bills for sell, counterfeit dollars for sell, Counterfeit Pounds for sell,

We offer only original high-quality real and fake passports, driver’s licenses, ID cards,Visas,Birth certificate , stamps and counterfeit bills To get the additional information and place your order, contact us at Our contact information.

fake USA(United States) passports, fake Australian passports, fake Belgium passports, fake Brazilian(Brazil) passports, fake Canadian(Canada) passports, fake Finnish(Finland) passports, fake French(France) passports, fake German(Germany) passports, fake Dutch(Netherlands/Holland) passports, fake Israel passports, fake UK(United Kingdom) passports, fake Spanish(Spain) passports, fake Mexican(Mexico) passports, buy fake South African passports. buy fake Australian driver licenses, buy fake Canadian driver licenses, buy fake French(France) driver licenses, buy fake Dutch(Netherlands/Holland) driving licenses, buy fake German(Germany) driving licenses, buy fake UK(United Kingdom) driving licenses, buy fake Diplomatic passports, buy fake USA(United States) passports, buy fake Australian passports, buy fake Belgium passports, buy fake Brazilian(Brazil) passports, buy fake Canadian(Canada) passports, buy fake Finnish(Finland) passports, buy fake French(France) passports, buy fake German(Germany) passports, buy fake Dutch(Netherlands/Holland) passports, buy fake Israel passports, buy fake UK(United Kingdom) passports, buy fake UK(United Kingdom) driving licenses, buy fake Diplomatic passports, buy Camouflage passports, buy passport Duplicates, fake USA(United States) passports for sale, fake Australian passports for sale, fake Belgium passports for sale, fake Brazilian(Brazil) passports for sale, fake Canadian(Canada) passports for sale, fake Finnish(Finland) passports for sale, fake French(France) passports for sale, fake German(Germany) passports for sale, fake Dutch(Netherlands/Holland) passports for sale, fake Israeli passports

I have done so many ID’s and So many Passports of all countries for my clients. I can get You any ID or Passport of your choice, be it U.S Passport, Canadian Passport, EU Passports, UK Passports, Australian Passport and New Zealand Passport.

Email: randyj...@gmail.com


counterfeit money14.jpg
Reply all
Reply to author
Forward
0 new messages