3 ms·
That's the opposite of what the question is asking for. They want to call fetch('/api/foo/bar') but on the client it does an HTTP call while on the server it re
by wwalser 10y ago
That's the opposite of what the question is asking for. They want to call fetch('/api/foo/bar') but on the client it does an HTTP call while on the server it recognizes that /api* is on the local system and therefore invoke that local route instead of doing an unnecessary http call.
That's what I'm apparently failing to describe how to accomplish :).
- chadscira 10y agoOh i see, I actually accomplished that a while back by monkey patching superagent to use Hapi.js, and inject.