Hacker News new | ask | show | jobs
by illicium 4251 days ago
Stop trying to shoehorn your backend into your web frontend, and treat the web frontend like the mobile one. That means, one single HTTP API to access the backend for both. I bet you already have this for your mobile app.

More often than not, the web frontend ends up being client side HTML/JS and some sort of intermediate middle-end server that hosts that HTML/JS. That way it turns into a fullstack app that does some processing on the middle-end to pass it on to the front-end JS.

You can make the frontend 100% static HTML/JS (and serveable off any static file CDN), so all you have to worry about is the API between them.