{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/112","labels_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/112/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/112/events","html_url":"https://github.com/ember-cli/ember-cli-deploy/issues/112","id":62865726,"number":112,"title":"[PROPOSAL] Write index on each build during development","user":{"login":"elucid","id":2888,"avatar_url":"https://avatars.githubusercontent.com/u/2888?v=3","gravatar_id":"","url":"https://api.github.com/users/elucid","html_url":"https://github.com/elucid","followers_url":"https://api.github.com/users/elucid/followers","following_url":"https://api.github.com/users/elucid/following{/other_user}","gists_url":"https://api.github.com/users/elucid/gists{/gist_id}","starred_url":"https://api.github.com/users/elucid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucid/subscriptions","organizations_url":"https://api.github.com/users/elucid/orgs","repos_url":"https://api.github.com/users/elucid/repos","events_url":"https://api.github.com/users/elucid/events{/privacy}","received_events_url":"https://api.github.com/users/elucid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-19T03:45:16Z","updated_at":"2015-04-16T08:21:53Z","closed_at":null,"body":"I use ember-cli-deploy for a project that is tightly coupled with its API server. The API server injects some session state into the `<head>` which helps to bootstrap the app on pageload.\r\n\r\nIn development, I originally used proxy middleware to read the index page and allow the apps to be developed simultaneously. However, this was cumbersome and substantially different from what runs in production mode.\r\n\r\nAfter watching a talk and learning about the `postBuild` hook for addons I wrote a little in-repo addon that writes the index to redis on each build in development so that the controller which reads from redis to serve the app can be used without any special case code in all environments.\r\n\r\nI've just extracted this to a standalone addon at https://github.com/elucid/ember-cli-redis-proxy\r\n\r\nIf many ember-cli-deploy users closely develop their API and ember apps this might be useful to include in ember-cli-deploy itself. I mentioned this to @lukemelia at EmberConf and he suggested I open an issue here to discuss.\r\n\r\nThe addon above obviously only works for redis and doesn't make use of anything in ember-cli-deploy aside from using its config to connect to redis. If there is interest in including this in ember-cli-deploy I can make a PR which makes use of the index adapter configured for ember-cli-deploy, supports index stores other than redis, etc.\r\n\r\nI haven't bothered doing any of those things because the simple addon works for my use case and without first gauging interest sending a PR would be quite presumptuous :) It possibly makes sense to just keep it as a separate addon."},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/comments/93675955","html_url":"https://github.com/ember-cli/ember-cli-deploy/issues/112#issuecomment-93675955","issue_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/112","id":93675955,"user":{"login":"himynameisjonas","id":39345,"avatar_url":"https://avatars.githubusercontent.com/u/39345?v=3","gravatar_id":"","url":"https://api.github.com/users/himynameisjonas","html_url":"https://github.com/himynameisjonas","followers_url":"https://api.github.com/users/himynameisjonas/followers","following_url":"https://api.github.com/users/himynameisjonas/following{/other_user}","gists_url":"https://api.github.com/users/himynameisjonas/gists{/gist_id}","starred_url":"https://api.github.com/users/himynameisjonas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/himynameisjonas/subscriptions","organizations_url":"https://api.github.com/users/himynameisjonas/orgs","repos_url":"https://api.github.com/users/himynameisjonas/repos","events_url":"https://api.github.com/users/himynameisjonas/events{/privacy}","received_events_url":"https://api.github.com/users/himynameisjonas/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T08:21:53Z","updated_at":"2015-04-16T08:21:53Z","body":"@elucid awesome stuff! "}}