Quantcast
Channel: Call a hapi route from another route - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Call a hapi route from another route

$
0
0

I am pretty new to HapiJS. I am building a service where I have two routes /route1 and /route2 both are using the plugin architecture. I have registered both as plugins on my manifest file.

I want to call /route1 from /route2 so /route2 depends on the payload reply from /route1. I've been looking at putting the logic of /route2 on /route1 on the pre-handler but I want to keep them separately.

Don't know how to call a registered plugin from another the thing is that both plugins (routes) are making networks requests. Thanks for reading.

Thanks.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images