{"action":"created","issue":{"url":"https://api.github.com/repos/bcruddy/flyswatter/issues/7","repository_url":"https://api.github.com/repos/bcruddy/flyswatter","labels_url":"https://api.github.com/repos/bcruddy/flyswatter/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/bcruddy/flyswatter/issues/7/comments","events_url":"https://api.github.com/repos/bcruddy/flyswatter/issues/7/events","html_url":"https://github.com/bcruddy/flyswatter/issues/7","id":295146740,"number":7,"title":"proxy server + config file","user":{"login":"bcruddy","id":5150154,"avatar_url":"https://avatars3.githubusercontent.com/u/5150154?v=4","gravatar_id":"","url":"https://api.github.com/users/bcruddy","html_url":"https://github.com/bcruddy","followers_url":"https://api.github.com/users/bcruddy/followers","following_url":"https://api.github.com/users/bcruddy/following{/other_user}","gists_url":"https://api.github.com/users/bcruddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bcruddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcruddy/subscriptions","organizations_url":"https://api.github.com/users/bcruddy/orgs","repos_url":"https://api.github.com/users/bcruddy/repos","events_url":"https://api.github.com/users/bcruddy/events{/privacy}","received_events_url":"https://api.github.com/users/bcruddy/received_events","type":"User","site_admin":false},"labels":[{"id":521956314,"url":"https://api.github.com/repos/bcruddy/flyswatter/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T13:57:10Z","updated_at":"2018-02-08T13:53:23Z","closed_at":"2018-02-08T13:53:23Z","author_association":"OWNER","body":"This would also require the cli to accept a config file (path passed as `---config=[path/to/config]`) instead of passing all of the config as cli arguments.\r\n\r\n```\r\n// flyswatter.config.js\r\n\r\nmodule.exports = {\r\n      https: true,\r\n      path: './',\r\n      port: 8080,\r\n      proxy: {\r\n            '/api': 'http://127.0.0.1:50545'\r\n      }\r\n};\r\n```\r\n\r\nThe general idea would be to have the `server` function iterate over the proxy object and add the routes to the express server using `app.use` to support all methods (`GET`, `POST`, `PUT`, etc). We also probably want to pass request headers along from the client to the server we're proxying to.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bcruddy/flyswatter/issues/comments/364117626","html_url":"https://github.com/bcruddy/flyswatter/issues/7#issuecomment-364117626","issue_url":"https://api.github.com/repos/bcruddy/flyswatter/issues/7","id":364117626,"user":{"login":"bcruddy","id":5150154,"avatar_url":"https://avatars3.githubusercontent.com/u/5150154?v=4","gravatar_id":"","url":"https://api.github.com/users/bcruddy","html_url":"https://github.com/bcruddy","followers_url":"https://api.github.com/users/bcruddy/followers","following_url":"https://api.github.com/users/bcruddy/following{/other_user}","gists_url":"https://api.github.com/users/bcruddy/gists{/gist_id}","starred_url":"https://api.github.com/users/bcruddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcruddy/subscriptions","organizations_url":"https://api.github.com/users/bcruddy/orgs","repos_url":"https://api.github.com/users/bcruddy/repos","events_url":"https://api.github.com/users/bcruddy/events{/privacy}","received_events_url":"https://api.github.com/users/bcruddy/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T13:53:23Z","updated_at":"2018-02-08T13:53:23Z","author_association":"OWNER","body":"Closed by #11"}}
{"actor":{"display_login":"bcruddy"}}