{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/2517","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/2517/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/2517/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/2517/events","html_url":"https://github.com/angular/angular-cli/issues/2517","id":181070856,"number":2517,"title":"Deployment on Heroku","user":{"login":"splacentino","id":5682706,"avatar_url":"https://avatars.githubusercontent.com/u/5682706?v=3","gravatar_id":"","url":"https://api.github.com/users/splacentino","html_url":"https://github.com/splacentino","followers_url":"https://api.github.com/users/splacentino/followers","following_url":"https://api.github.com/users/splacentino/following{/other_user}","gists_url":"https://api.github.com/users/splacentino/gists{/gist_id}","starred_url":"https://api.github.com/users/splacentino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/splacentino/subscriptions","organizations_url":"https://api.github.com/users/splacentino/orgs","repos_url":"https://api.github.com/users/splacentino/repos","events_url":"https://api.github.com/users/splacentino/events{/privacy}","received_events_url":"https://api.github.com/users/splacentino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-05T05:55:06Z","updated_at":"2016-10-07T14:04:37Z","closed_at":null,"body":"### Versions.\r\n> angular-cli: 1.0.0-beta.16                                                                                                                        \r\n> node: 6.6.0 \r\n\r\nHi. I would like to deploy my angular2 app on a Heroku web dyno. What is the best way to do it **using angular-cli**.\r\n\r\nAt this time, I build the prod. version locally and push my `dist/` folder on Git. Then I use `http-server` to serve the static files from `dist/`\r\n\r\n```json\r\n    \"start.prod\": \"http-server dist/\",\r\n    \"build.prod\": \"ng build --prod\",\r\n```\r\n\r\nProcfile\r\n```\r\nnpm run start.prod\r\n```\r\n\r\nThere would probably be a cleaner way to do it. I can't make CLI working on the Heroku dyno so I am not able to build the app on it.\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/252260914","html_url":"https://github.com/angular/angular-cli/issues/2517#issuecomment-252260914","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/2517","id":252260914,"user":{"login":"richpeck","id":1104431,"avatar_url":"https://avatars.githubusercontent.com/u/1104431?v=3","gravatar_id":"","url":"https://api.github.com/users/richpeck","html_url":"https://github.com/richpeck","followers_url":"https://api.github.com/users/richpeck/followers","following_url":"https://api.github.com/users/richpeck/following{/other_user}","gists_url":"https://api.github.com/users/richpeck/gists{/gist_id}","starred_url":"https://api.github.com/users/richpeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richpeck/subscriptions","organizations_url":"https://api.github.com/users/richpeck/orgs","repos_url":"https://api.github.com/users/richpeck/repos","events_url":"https://api.github.com/users/richpeck/events{/privacy}","received_events_url":"https://api.github.com/users/richpeck/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T14:04:37Z","updated_at":"2016-10-07T14:04:37Z","body":"[Heroku uses `heroku-postinstall` and `heroku-preinstall` hooks](https://devcenter.heroku.com/articles/nodejs-support#customizing-the-build-process) which you can use to build:\r\n\r\n```\r\n\"heroku-preinstall\": \"npm install -g http-server\",\r\n\"heroku-postinstall\": \"ng build --prod\"\r\n```\r\n\r\nYou can also use the \"start\" hook to serve:\r\n\r\n`\"start\": \"http-server dist/\"`"}}
{"actor":{"display_login":"richpeck"}}