title: How to setup development environment for Ember.js + Express
body: <p>I'm in the process of splitting into two different projects an Ember.js app and its Express REST API counterpart. I assumed that things would be cleaner this way.</p>
  <p>Until then, my Express app was both serving REST endpoints and all static files like <code>index.html</code> and <code>app.js</code>. But now, ember-cli is in charge of serving the static files and the Express app handles authentication + REST.</p>
  <p>The last issue I'm having is that I now have two different ports: ember-cli uses <code>http://localhost:4200</code> and express uses <code>http://localhost:3333</code>. When I get the session cookie from Express upon authentication, it's never being sent on subsequent request because of same origin policy (see: <a href="https://stackoverflow.com/q/2099728/386413">How do I send an AJAX request on a different port with jQuery?</a>).</p>
  <p>Now if I understand correctly I have two solutions:</p>
  <ol>
  <li>Setup Express to support JSONP and make sure Ember uses it too</li>
  <li>Install a local Nginx or Apache and setup a proxy pass</li>
  </ol>
  <p>The first solution is not ok because after deployment both apps will use the same domain/port. The second solution would probably work but it seems a bit ridiculous to ask developers to install a local web server to simply run an app.</p>
  <p>I'm sure many of you have encountered that issue before. What would you suggest to make development easy?</p>
  <p>Thanks!</p>