Search code examples
ember.jsember.js-fastboot

Can I map/redirect routes to ports in the Ember FastBoot App Server?


I would like to map specific ports to certain routes on Ember FastBoot App Server so that I don't need a different url for different services.

Intended for production, I can not use development-only flags.

Example

  • www.example.com:443 Ember FastBoot App Server (4200)
  • www.example.com:443/api/* Node.js API (8080)
  • www.example.com:443/db/* CouchDB (5986)

Solution

  • You can provide custom middleware. Here you can provide middleware to proxy these routes for example with node-http-proxy.