How to deploy separated frontend and backend?
I am developing a new project with react/express as the frontend and loopback as the backend api. I have separated both of them in my development environment with different ports.
How should I deploy them in production?
Hosting on a same server - separate the backend with a different sub-domain?
Hosting on 2 different servers - seems impossible to use back the same domain.
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, eg
app.domain.com
on GitHub Pages api.domain.com
on Heroku 上一篇: Sqlite主键在多个列上
下一篇: 如何部署分离的前端和后端?