{"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":40,"created_at":"2016-07-24T03:50:18Z","updated_at":"2016-07-27T01:06:16Z","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/235452452","html_url":"https://github.com/facebookincubator/create-react-app/issues/147#issuecomment-235452452","issue_url":"https://api.github.com/repos/facebookincubator/create-react-app/issues/147","id":235452452,"user":{"login":"lacker","id":106475,"avatar_url":"https://avatars.githubusercontent.com/u/106475?v=3","gravatar_id":"","url":"https://api.github.com/users/lacker","html_url":"https://github.com/lacker","followers_url":"https://api.github.com/users/lacker/followers","following_url":"https://api.github.com/users/lacker/following{/other_user}","gists_url":"https://api.github.com/users/lacker/gists{/gist_id}","starred_url":"https://api.github.com/users/lacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lacker/subscriptions","organizations_url":"https://api.github.com/users/lacker/orgs","repos_url":"https://api.github.com/users/lacker/repos","events_url":"https://api.github.com/users/lacker/events{/privacy}","received_events_url":"https://api.github.com/users/lacker/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T01:06:16Z","updated_at":"2016-07-27T01:06:16Z","body":"@taion An express router behaves just like a middleware. So I was thinking `middleware.js` would export a middleware that got mounted at `/` and it would just call `next()` on paths that should get routed to the dev server. This way you can have a single middleware handle routing several prefixes to several different backend microservices. The name `middleware.js` might be confusing here though."}}
{"actor":{"display_login":"lacker"}}