{"action":"created","issue":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147","repository_url":"https://api.github.com/repos/facebookincubator/create-react-app","labels_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147/comments","events_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147/events","html_url":"https://github.com/facebookincubator/create-react-app/issues/147","id":167215500,"number":147,"title":"Provide API to integrate with custom servers","user":{"login":"jlongster","id":17031,"avatar_url":"https://avatars.githubusercontent.com/u/17031?v=3","gravatar_id":"","url":"https://api.github.com/users/jlongster","html_url":"https://github.com/jlongster","followers_url":"https://api.github.com/users/jlongster/followers","following_url":"https://api.github.com/users/jlongster/following{/other_user}","gists_url":"https://api.github.com/users/jlongster/gists{/gist_id}","starred_url":"https://api.github.com/users/jlongster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlongster/subscriptions","organizations_url":"https://api.github.com/users/jlongster/orgs","repos_url":"https://api.github.com/users/jlongster/repos","events_url":"https://api.github.com/users/jlongster/events{/privacy}","received_events_url":"https://api.github.com/users/jlongster/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/discussion","name":"discussion","color":"fbca04"},{"url":"https://api.github.com/repos/facebookincubator/create-react-app/labels/future%20idea","name":"future idea","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":31,"created_at":"2016-07-24T03:50:18Z","updated_at":"2016-07-26T21:07:46Z","closed_at":null,"body":"The main problem I have so far is that I have my own node server for the backend. I could run both that and the `create-react-app` server, but I think we've learned from webpack's dev server that it's not ideal to have to manage 2 processes.\r\n\r\nWould you be open to exposing an API for this project in addition to the CLI? One option is for it to take an express server and add all the url handlers, but then you're binding yourself down to express which you probably don't want. Of course, if you moved away from express it'd be impossible to integrate with existing express servers anyway.\r\n\r\nIsn't there a way for node's low-level `http` servers to be composed? If so, you could make sure that requests go through the dev server first, and then through the user's server. Theoretically that means the types of server's don't have to match (the dev server could be using express, the user's hapi)."},"comment":{"url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/comments/235405849","html_url":"https://github.com/facebookincubator/create-react-app/issues/147#issuecomment-235405849","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147","id":235405849,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T21:07:46Z","updated_at":"2016-07-26T21:07:46Z","body":"Also, it's hard to define a proxy fallback unless you hardcode some path like `/api/*`.\r\n\r\nIf you want to extend `create-react-app` to handle routing with the HTML5 history API for navigation, you need to enable `historyApiFallback` for the webpack dev server, in which case the dev server will try to handle all paths – so you'd need an explicit blacklist to proxy things to the backend server."}}
{"actor":{"display_login":"taion"}}