Ember + Rails = Single app or Two apps?


I want to start a new project with Rails as API and Ember for front end. I don’t know if it should be two apps or a single one. I like the idea to separate the frontend and the backend but I like rails and I am used to using rails. I seen https://github.com/rwz/ember-cli-rails. I can use ember-cli with rails. It seems to be interesting.

What is your opinion ?


I’ve been keeping them separate when I can. For serving it up from the rails app ember-cli-rails works well but also checkout this comment on github if you’d like to keep them truly separate.

During development I’ll use ember-cli’s proxying to hit my rails app. If you start the server with ember server --proxy=http://localhost:3000/ then you can develop within ember-cli and any ajax requests will be sent to your rails app.

I also wrote a series of blogposts on deploying a rails backend to heroku and an ember-cli app to divshot if that sort of thing interests you.

I think ember-cli-rails is a great solution: for the most part, it doesn’t tightly couple Ember to Rails, and it allows for some pretty powerful stuff like preloading data that you can’t really get keeping them completely separate.