{"action":"created","issue":{"url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/3","labels_url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/3/comments","events_url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/3/events","html_url":"https://github.com/bahamas10/node-url-shortener/pull/3","id":63302593,"number":3,"title":"Added multi-domain support (in a good way!!!)","user":{"login":"jacobhands","id":10719325,"avatar_url":"https://avatars.githubusercontent.com/u/10719325?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobhands","html_url":"https://github.com/jacobhands","followers_url":"https://api.github.com/users/jacobhands/followers","following_url":"https://api.github.com/users/jacobhands/following{/other_user}","gists_url":"https://api.github.com/users/jacobhands/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobhands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobhands/subscriptions","organizations_url":"https://api.github.com/users/jacobhands/orgs","repos_url":"https://api.github.com/users/jacobhands/repos","events_url":"https://api.github.com/users/jacobhands/events{/privacy}","received_events_url":"https://api.github.com/users/jacobhands/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-20T20:36:09Z","updated_at":"2015-03-31T21:35:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bahamas10/node-url-shortener/pulls/3","html_url":"https://github.com/bahamas10/node-url-shortener/pull/3","diff_url":"https://github.com/bahamas10/node-url-shortener/pull/3.diff","patch_url":"https://github.com/bahamas10/node-url-shortener/pull/3.patch"},"body":"So I'm not sure that you would actually want this in your version, but I thought I'd see what you think.\r\nEssentially I need to have custom URL's for multiple domains. But I wanted to be able to have `http://foo/a` and `http://bar/a` go to separate redirects.\r\n\r\nObviously you could have them all be the same pool and just forward each DNS name to the server and be done with it. But I really wanted each DNS name to have a unique set of short URL's.\r\nI could have had a seperate instance + config for each domain, but that's such a pain to maintain.\r\n\r\nSo instead I changed it so that the first url argument is the domain, and the second is the key.\r\nLike so:\r\n`localhost:8090/domain/shorturl` instead of simply `localhost:8090/shorturl`\r\n\r\nTo implement it I used nginx which simply does a proxy pass to `localhost:8090/domain` as apposed to `localhost:8090`\r\n\r\nIn the end it works virtually the same to the end user, but `http://foo/a` and `http://bar/a` will only go to the same place if explicitly defined in the JSON file.\r\n\r\nWhat do you think?\r\n\r\nPs. Ignore all the `.idea` files which WebStorm adds..."},"comment":{"url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/comments/88257383","html_url":"https://github.com/bahamas10/node-url-shortener/pull/3#issuecomment-88257383","issue_url":"https://api.github.com/repos/bahamas10/node-url-shortener/issues/3","id":88257383,"user":{"login":"papertigers","id":792549,"avatar_url":"https://avatars.githubusercontent.com/u/792549?v=3","gravatar_id":"","url":"https://api.github.com/users/papertigers","html_url":"https://github.com/papertigers","followers_url":"https://api.github.com/users/papertigers/followers","following_url":"https://api.github.com/users/papertigers/following{/other_user}","gists_url":"https://api.github.com/users/papertigers/gists{/gist_id}","starred_url":"https://api.github.com/users/papertigers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/papertigers/subscriptions","organizations_url":"https://api.github.com/users/papertigers/orgs","repos_url":"https://api.github.com/users/papertigers/repos","events_url":"https://api.github.com/users/papertigers/events{/privacy}","received_events_url":"https://api.github.com/users/papertigers/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T21:35:57Z","updated_at":"2015-03-31T21:35:57Z","body":"Please no.  Please keep this simple.  I do not want to rely on nginx for url shortening. "}}