I have a server and I am designing some web applications. I use React as frontend framework and Rust Actix as backend framework. The backend program listens at 8000 port, and can be reached by my_domain:8000/api/xxxx
.
I think I can use a web server listening at 80 port, such that if client is requesting /
, then returning the frontend page, if client is requesting /api
, then redirect the request to 8000 port of localhost.
My problems are:
- Is the above way recommended in the modern web application design? Are there any other ways of hosting both frontend and backend application in the server?
- What web server can I use? Apache, Nginx, or manually write a web server?
- I use two docker containers to contain the frontend and backend app. Do I need to dockerize the web server as well?
Top comments (0)