{"action":"created","comment":{"url":"https://api.github.com/repos/zappajs/zappajs/pulls/comments/75009223","id":75009223,"diff_hunk":"@@ -852,19 +853,24 @@ Takes a function and runs it as a zappa app. Optionally accepts a port number, a\n               switch k\n                 when 'host' then host = v\n                 when 'port' then port = v\n+                when 'path' then ipc_path = v\n                 else options[k] = v\n \n       zapp = zappa.app(root_function,options)\n       {server,app} = zapp\n \n+      is_ipc = typeof ipc_path is 'string'\n+\n       server.on 'listening', ->\n-        addr = server.address()\n+        channel = if is_ipc then ipc_path else do (addr = server.address()) -> \"#{addr.address}:#{addr.port}\"\n         debug \"\"\"\n-          Express server listening on #{addr.address}:#{addr.port} in #{app.settings.env} mode.\n+          Express server listening on #{channel} in #{app.settings.env} mode.\n           Zappa #{zappa.version} orchestrating the show.\n \n         \"\"\"\n \n+      if is_ipc","path":"src/zappa.coffee.md","position":30,"original_position":30,"commit_id":"6c0b52f4f77a2d37a41697155ef084476843975d","original_commit_id":"6c0b52f4f77a2d37a41697155ef084476843975d","user":{"login":"shimaore","id":55340,"avatar_url":"https://avatars.githubusercontent.com/u/55340?v=3","gravatar_id":"","url":"https://api.github.com/users/shimaore","html_url":"https://github.com/shimaore","followers_url":"https://api.github.com/users/shimaore/followers","following_url":"https://api.github.com/users/shimaore/following{/other_user}","gists_url":"https://api.github.com/users/shimaore/gists{/gist_id}","starred_url":"https://api.github.com/users/shimaore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimaore/subscriptions","organizations_url":"https://api.github.com/users/shimaore/orgs","repos_url":"https://api.github.com/users/shimaore/repos","events_url":"https://api.github.com/users/shimaore/events{/privacy}","received_events_url":"https://api.github.com/users/shimaore/received_events","type":"User","site_admin":false},"body":"This will create both an IPC and an HTTP server (on port 3000). I'd rather have only the IPC server started if `path` is specified:\r\n\r\n      switch\r\n        when ipc_path?\r\n          server.listen ipc_path\r\n        when host\r\n          server.listen port, host\r\n        else\r\n          server.listen port\r\n","created_at":"2016-08-16T20:04:31Z","updated_at":"2016-08-16T20:04:31Z","html_url":"https://github.com/zappajs/zappajs/pull/117#discussion_r75009223","pull_request_url":"https://api.github.com/repos/zappajs/zappajs/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/comments/75009223"},"html":{"href":"https://github.com/zappajs/zappajs/pull/117#discussion_r75009223"},"pull_request":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/zappajs/zappajs/pulls/117","id":81525555,"html_url":"https://github.com/zappajs/zappajs/pull/117","diff_url":"https://github.com/zappajs/zappajs/pull/117.diff","patch_url":"https://github.com/zappajs/zappajs/pull/117.patch","issue_url":"https://api.github.com/repos/zappajs/zappajs/issues/117","number":117,"state":"open","locked":false,"title":"IPC socket support","user":{"login":"atifaziz","id":20511,"avatar_url":"https://avatars.githubusercontent.com/u/20511?v=3","gravatar_id":"","url":"https://api.github.com/users/atifaziz","html_url":"https://github.com/atifaziz","followers_url":"https://api.github.com/users/atifaziz/followers","following_url":"https://api.github.com/users/atifaziz/following{/other_user}","gists_url":"https://api.github.com/users/atifaziz/gists{/gist_id}","starred_url":"https://api.github.com/users/atifaziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atifaziz/subscriptions","organizations_url":"https://api.github.com/users/atifaziz/orgs","repos_url":"https://api.github.com/users/atifaziz/repos","events_url":"https://api.github.com/users/atifaziz/events{/privacy}","received_events_url":"https://api.github.com/users/atifaziz/received_events","type":"User","site_admin":false},"body":"See #116 for background.\r\n\r\nThis PR enables a path to be specified for UNIX sockets (named pipes in Windows) for IPC purposes. To avoid breaking changes, the path is specified as a property of the `options` argument passed to `zappa.run`. It takes precedence over any host or port supplied. Since only or the other makes sense, we can debate on whether an error should be thrown if both are supplied. \r\n\r\n> For tests I think a simple get test in tests/run.coffee should be enough?\r\n\r\n@shimaore Except if the path does not exist at time of listening then`server.listen` will fail. I was hoping that the tests use stubs.\r\n\r\n","created_at":"2016-08-16T18:59:00Z","updated_at":"2016-08-16T20:04:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9f5aa2fd56ca7ceee49afbd239e028610bb6fb3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zappajs/zappajs/pulls/117/commits","review_comments_url":"https://api.github.com/repos/zappajs/zappajs/pulls/117/comments","review_comment_url":"https://api.github.com/repos/zappajs/zappajs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zappajs/zappajs/issues/117/comments","statuses_url":"https://api.github.com/repos/zappajs/zappajs/statuses/6c0b52f4f77a2d37a41697155ef084476843975d","head":{"label":"atifaziz:ipc-socket","ref":"ipc-socket","sha":"6c0b52f4f77a2d37a41697155ef084476843975d","user":{"login":"atifaziz","id":20511,"avatar_url":"https://avatars.githubusercontent.com/u/20511?v=3","gravatar_id":"","url":"https://api.github.com/users/atifaziz","html_url":"https://github.com/atifaziz","followers_url":"https://api.github.com/users/atifaziz/followers","following_url":"https://api.github.com/users/atifaziz/following{/other_user}","gists_url":"https://api.github.com/users/atifaziz/gists{/gist_id}","starred_url":"https://api.github.com/users/atifaziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atifaziz/subscriptions","organizations_url":"https://api.github.com/users/atifaziz/orgs","repos_url":"https://api.github.com/users/atifaziz/repos","events_url":"https://api.github.com/users/atifaziz/events{/privacy}","received_events_url":"https://api.github.com/users/atifaziz/received_events","type":"User","site_admin":false},"repo":{"id":65831940,"name":"zappajs","full_name":"atifaziz/zappajs","owner":{"login":"atifaziz","id":20511,"avatar_url":"https://avatars.githubusercontent.com/u/20511?v=3","gravatar_id":"","url":"https://api.github.com/users/atifaziz","html_url":"https://github.com/atifaziz","followers_url":"https://api.github.com/users/atifaziz/followers","following_url":"https://api.github.com/users/atifaziz/following{/other_user}","gists_url":"https://api.github.com/users/atifaziz/gists{/gist_id}","starred_url":"https://api.github.com/users/atifaziz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atifaziz/subscriptions","organizations_url":"https://api.github.com/users/atifaziz/orgs","repos_url":"https://api.github.com/users/atifaziz/repos","events_url":"https://api.github.com/users/atifaziz/events{/privacy}","received_events_url":"https://api.github.com/users/atifaziz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atifaziz/zappajs","description":"web application framework for node built on express and socket.io, based on mauricemach/zappa","fork":true,"url":"https://api.github.com/repos/atifaziz/zappajs","forks_url":"https://api.github.com/repos/atifaziz/zappajs/forks","keys_url":"https://api.github.com/repos/atifaziz/zappajs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atifaziz/zappajs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atifaziz/zappajs/teams","hooks_url":"https://api.github.com/repos/atifaziz/zappajs/hooks","issue_events_url":"https://api.github.com/repos/atifaziz/zappajs/issues/events{/number}","events_url":"https://api.github.com/repos/atifaziz/zappajs/events","assignees_url":"https://api.github.com/repos/atifaziz/zappajs/assignees{/user}","branches_url":"https://api.github.com/repos/atifaziz/zappajs/branches{/branch}","tags_url":"https://api.github.com/repos/atifaziz/zappajs/tags","blobs_url":"https://api.github.com/repos/atifaziz/zappajs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atifaziz/zappajs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atifaziz/zappajs/git/refs{/sha}","trees_url":"https://api.github.com/repos/atifaziz/zappajs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atifaziz/zappajs/statuses/{sha}","languages_url":"https://api.github.com/repos/atifaziz/zappajs/languages","stargazers_url":"https://api.github.com/repos/atifaziz/zappajs/stargazers","contributors_url":"https://api.github.com/repos/atifaziz/zappajs/contributors","subscribers_url":"https://api.github.com/repos/atifaziz/zappajs/subscribers","subscription_url":"https://api.github.com/repos/atifaziz/zappajs/subscription","commits_url":"https://api.github.com/repos/atifaziz/zappajs/commits{/sha}","git_commits_url":"https://api.github.com/repos/atifaziz/zappajs/git/commits{/sha}","comments_url":"https://api.github.com/repos/atifaziz/zappajs/comments{/number}","issue_comment_url":"https://api.github.com/repos/atifaziz/zappajs/issues/comments{/number}","contents_url":"https://api.github.com/repos/atifaziz/zappajs/contents/{+path}","compare_url":"https://api.github.com/repos/atifaziz/zappajs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atifaziz/zappajs/merges","archive_url":"https://api.github.com/repos/atifaziz/zappajs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atifaziz/zappajs/downloads","issues_url":"https://api.github.com/repos/atifaziz/zappajs/issues{/number}","pulls_url":"https://api.github.com/repos/atifaziz/zappajs/pulls{/number}","milestones_url":"https://api.github.com/repos/atifaziz/zappajs/milestones{/number}","notifications_url":"https://api.github.com/repos/atifaziz/zappajs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atifaziz/zappajs/labels{/name}","releases_url":"https://api.github.com/repos/atifaziz/zappajs/releases{/id}","deployments_url":"https://api.github.com/repos/atifaziz/zappajs/deployments","created_at":"2016-08-16T15:32:50Z","updated_at":"2016-08-16T15:32:51Z","pushed_at":"2016-08-16T18:56:46Z","git_url":"git://github.com/atifaziz/zappajs.git","ssh_url":"git@github.com:atifaziz/zappajs.git","clone_url":"https://github.com/atifaziz/zappajs.git","svn_url":"https://github.com/atifaziz/zappajs","homepage":"http://zappajs.github.com/zappajs/","size":1841,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"5.x"}},"base":{"label":"zappajs:5.x","ref":"5.x","sha":"19f7740c8f019ca2e748b72b1b8f92dab21652cd","user":{"login":"zappajs","id":1650716,"avatar_url":"https://avatars.githubusercontent.com/u/1650716?v=3","gravatar_id":"","url":"https://api.github.com/users/zappajs","html_url":"https://github.com/zappajs","followers_url":"https://api.github.com/users/zappajs/followers","following_url":"https://api.github.com/users/zappajs/following{/other_user}","gists_url":"https://api.github.com/users/zappajs/gists{/gist_id}","starred_url":"https://api.github.com/users/zappajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zappajs/subscriptions","organizations_url":"https://api.github.com/users/zappajs/orgs","repos_url":"https://api.github.com/users/zappajs/repos","events_url":"https://api.github.com/users/zappajs/events{/privacy}","received_events_url":"https://api.github.com/users/zappajs/received_events","type":"Organization","site_admin":false},"repo":{"id":4049486,"name":"zappajs","full_name":"zappajs/zappajs","owner":{"login":"zappajs","id":1650716,"avatar_url":"https://avatars.githubusercontent.com/u/1650716?v=3","gravatar_id":"","url":"https://api.github.com/users/zappajs","html_url":"https://github.com/zappajs","followers_url":"https://api.github.com/users/zappajs/followers","following_url":"https://api.github.com/users/zappajs/following{/other_user}","gists_url":"https://api.github.com/users/zappajs/gists{/gist_id}","starred_url":"https://api.github.com/users/zappajs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zappajs/subscriptions","organizations_url":"https://api.github.com/users/zappajs/orgs","repos_url":"https://api.github.com/users/zappajs/repos","events_url":"https://api.github.com/users/zappajs/events{/privacy}","received_events_url":"https://api.github.com/users/zappajs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zappajs/zappajs","description":"web application framework for node built on express and socket.io, based on mauricemach/zappa","fork":true,"url":"https://api.github.com/repos/zappajs/zappajs","forks_url":"https://api.github.com/repos/zappajs/zappajs/forks","keys_url":"https://api.github.com/repos/zappajs/zappajs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zappajs/zappajs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zappajs/zappajs/teams","hooks_url":"https://api.github.com/repos/zappajs/zappajs/hooks","issue_events_url":"https://api.github.com/repos/zappajs/zappajs/issues/events{/number}","events_url":"https://api.github.com/repos/zappajs/zappajs/events","assignees_url":"https://api.github.com/repos/zappajs/zappajs/assignees{/user}","branches_url":"https://api.github.com/repos/zappajs/zappajs/branches{/branch}","tags_url":"https://api.github.com/repos/zappajs/zappajs/tags","blobs_url":"https://api.github.com/repos/zappajs/zappajs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zappajs/zappajs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zappajs/zappajs/git/refs{/sha}","trees_url":"https://api.github.com/repos/zappajs/zappajs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zappajs/zappajs/statuses/{sha}","languages_url":"https://api.github.com/repos/zappajs/zappajs/languages","stargazers_url":"https://api.github.com/repos/zappajs/zappajs/stargazers","contributors_url":"https://api.github.com/repos/zappajs/zappajs/contributors","subscribers_url":"https://api.github.com/repos/zappajs/zappajs/subscribers","subscription_url":"https://api.github.com/repos/zappajs/zappajs/subscription","commits_url":"https://api.github.com/repos/zappajs/zappajs/commits{/sha}","git_commits_url":"https://api.github.com/repos/zappajs/zappajs/git/commits{/sha}","comments_url":"https://api.github.com/repos/zappajs/zappajs/comments{/number}","issue_comment_url":"https://api.github.com/repos/zappajs/zappajs/issues/comments{/number}","contents_url":"https://api.github.com/repos/zappajs/zappajs/contents/{+path}","compare_url":"https://api.github.com/repos/zappajs/zappajs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zappajs/zappajs/merges","archive_url":"https://api.github.com/repos/zappajs/zappajs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zappajs/zappajs/downloads","issues_url":"https://api.github.com/repos/zappajs/zappajs/issues{/number}","pulls_url":"https://api.github.com/repos/zappajs/zappajs/pulls{/number}","milestones_url":"https://api.github.com/repos/zappajs/zappajs/milestones{/number}","notifications_url":"https://api.github.com/repos/zappajs/zappajs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zappajs/zappajs/labels{/name}","releases_url":"https://api.github.com/repos/zappajs/zappajs/releases{/id}","deployments_url":"https://api.github.com/repos/zappajs/zappajs/deployments","created_at":"2012-04-17T06:12:22Z","updated_at":"2016-08-01T11:13:00Z","pushed_at":"2016-08-16T18:59:00Z","git_url":"git://github.com/zappajs/zappajs.git","ssh_url":"git@github.com:zappajs/zappajs.git","clone_url":"https://github.com/zappajs/zappajs.git","svn_url":"https://github.com/zappajs/zappajs","homepage":"http://zappajs.github.com/zappajs/","size":1877,"stargazers_count":190,"watchers_count":190,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":29,"mirror_url":null,"open_issues_count":12,"forks":29,"open_issues":12,"watchers":190,"default_branch":"5.x"}},"_links":{"self":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/117"},"html":{"href":"https://github.com/zappajs/zappajs/pull/117"},"issue":{"href":"https://api.github.com/repos/zappajs/zappajs/issues/117"},"comments":{"href":"https://api.github.com/repos/zappajs/zappajs/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zappajs/zappajs/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/zappajs/zappajs/statuses/6c0b52f4f77a2d37a41697155ef084476843975d"}}}}
{"actor":{"display_login":"shimaore"}}