Proxy on AWS App Runner for Vue.js / Express App

0

Trying to run a Vue.js app with a Node.js Express backend on AWS App Runner.

Is there a way to setup a proxy (like nginx) so that the HTTP /api path is routed to a separate container/host through the same domain?

The problem I’m running into: When the Vue.js client app and Express server api are deployed, they run on two separate publicly accessible hosts. I need to setup App Runner to use a proxy so both hosts can be accessed through a single domain using HTTP paths.

(Alternatively, I can enable CORS policy, but A JavaScript app running on port 8080 connecting to a Node.js Express app running on port 5000 is a fairly common pattern. I feel like this is something that App Runner was built to handle, and I’m not sure what I’m missing.)

已提問 2 年前檢視次數 212 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南