Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4869

Ember Test and Multiple Proxy Paths

$
0
0

@dlindquist-egistix wrote:

We are currently using Ember with multiple backends, and thus require multiple “proxies” – for example:

  • any traffic to /backend-one needs to get proxied to http://serverone/somewhere/
  • any traffic to /backend-two needs to get proxied to http://servertwo/somewhereelse/

Since ember server only supports (as far as I know) a single --proxy ..., we have (for better or worse) set this up by:

  • Creating a server/index.js file
  • In this file, doing a require('http-proxy').createProxyServer({}) and then an app.use(...) to enact the proxy for a given path. (The proxy/app.use is 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 the server/index.js file, 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 :slight_smile: )

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4869

Trending Articles