@dlindquist-egistix wrote:
We are currently using Ember with multiple backends, and thus require multiple “proxies” – for example:
- any traffic to
/backend-oneneeds to get proxied tohttp://serverone/somewhere/- any traffic to
/backend-twoneeds to get proxied tohttp://servertwo/somewhereelse/Since
ember serveronly supports (as far as I know) a single--proxy ..., we have (for better or worse) set this up by:
- Creating a
server/index.jsfile- In this file, doing a
require('http-proxy').createProxyServer({})and then anapp.use(...)to enact the proxy for a given path. (Theproxy/app.useis done twice, one for each path.)Now, this may be completely the wrong methodology, but it is how it currently works (and it seems to work fine).
Unfortunately, this causes us a bit of a problem for acceptance tests – we would like to have our acceptance tests access a ‘real’ backend, and thus they need to use the proxy. However, when we fire up
ember test, it does not seem to run theserver/index.jsfile, which means our proxies don’t run.Can someone tell me “you are doing this completely wrong” and point me in the right direction?
(As an aside, we are currently using Ember 2.18 – I know, it’s old, but the upgrade hasn’t happened yet
)
Thanks in advance!
Posts: 1
Participants: 1
)