Ember as part of a serverside app


I’ve got a problem and I’m not sure the solution I found is the best solution to it. I have an express app that serves a bunch of pages, in one of those pages(/user/dashboard) I would like to run an ember-cli app with the only caveat is that that route is authenticated. So when the user navigates to that route, express will send the session cookie and the ember app will boot up allowing it to make calls to the private API. Now this works fine when I build my app for production and dump the dist folder somewhere in the /public folder and serve that, the problem I’m facing is how to go about developing with that workflow in mind. Ideally I would like to keep booth as independent apps and only having them merged once its ready for production.

I was thinking about doing ember build --watch and symlink the /dist folder to my express-app/public/user-dashboard/ directory. I somehow think that there must be a better way to accomplish this, any ideas?


Do you use session cookies for authentication? Shouldn’t be a problem then as you probably access both apps with localhost given your set-cookie header doesn’t specify a port.

I do login with my ember app, so this is different, but the solution with the proxy flag works fine for me.

Ah cool, yeah I do use cookies its being working fine so far. Just was curious on whether there was a better/different way to go about doing this. Thanks :slight_smile: