3 ms·
Ok, but what if you build a JS client that is calling an API to build the pages? Then there should be only one API, I guess.
by gbog 14y ago
Ok, but what if you build a JS client that is calling an API to build the pages? Then there should be only one API, I guess.
- lmm 14y agoThat works (though you might have trouble with older browsers), but you need to treat it as a "real" program, and you wouldn't want to serve it from the same endpoint as your API using accept headers like you're suggesting. And it's not really any different from the current way of doing things; it's always been good practice to build your web tier on top of your API.