How to deploy separated frontend and backend?
I just answered a related question for AWS.
You can deploy
your frontend on a static hosting service and a CDN
your backend on a cloud computing service
You can set different subdomains on different hosts, e.g.
app.domain.com
on GitHub Pagesapi.domain.com
on Heroku