{"action":"created","comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments/53005246","id":53005246,"diff_hunk":"@@ -0,0 +1,58 @@\n+var path = require(\"path\");\n+function loadFromCommandLine(args) {\n+  args = args || [];\n+  while (args.length > 0) {\n+    if (args[0] == \"--config\") {\n+      if (args.length < 2) {\n+        throw \"Please specify the configuration file (json)\";\n+      }\n+      return require(path.resolve(args[1]));\n+    }\n+    args = args.slice(1, args.length);\n+  }\n+}\n+\n+function loadFromEnvironment(env) {\n+  env = env || {};\n+  var options = {};\n+  if (env.PARSE_SERVER_OPTIONS) {\n+\n+    options = JSON.parse(env.PARSE_SERVER_OPTIONS);\n+\n+  } else {\n+\n+    options.databaseURI = env.PARSE_SERVER_DATABASE_URI;\n+    options.cloud = env.PARSE_SERVER_CLOUD_CODE_MAIN;\n+    options.collectionPrefix = env.PARSE_SERVER_COLLECTION_PREFIX;","path":"bin/config.js","position":26,"original_position":26,"commit_id":"9b5da873bcf84c72fa4c7aa09ff7d4925652c16e","original_commit_id":"9b5da873bcf84c72fa4c7aa09ff7d4925652c16e","user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"body":"I don't think we'll support multiple apps through ENV, seems painful to provide all APP ID settings. But I agree in principle with multiple levels of configuration for multiple apps. \r\n","created_at":"2016-02-16T12:45:47Z","updated_at":"2016-02-16T12:45:47Z","html_url":"https://github.com/ParsePlatform/parse-server/pull/263#discussion_r53005246","pull_request_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263","_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments/53005246"},"html":{"href":"https://github.com/ParsePlatform/parse-server/pull/263#discussion_r53005246"},"pull_request":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263"}}},"pull_request":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263","id":58474234,"html_url":"https://github.com/ParsePlatform/parse-server/pull/263","diff_url":"https://github.com/ParsePlatform/parse-server/pull/263.diff","patch_url":"https://github.com/ParsePlatform/parse-server/pull/263.patch","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/263","number":263,"state":"open","locked":false,"title":"adds support for multiple apps on a single server","user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"body":"- Adds support for loading configuration from JSON\r\n- Adds support for loading multiple configurations from ENV\r\n- Adds generator for new app keys\r\n- Adds support for cloud code isolated processes\r\n- Adds cloud code runner / launcher\r\n- Full  /hooks REST API (only master)\r\n- Parse.Hooks: register hooks on nodejs/cloud code server \r\n- Parse.Cloud with automatic hooks registration (from parse-cloud-express)\r\n- Customizable hook registration strategy for cloud code server (always, try, never)\r\n- All unit tests are running in a multiple apps context","created_at":"2016-02-05T19:38:26Z","updated_at":"2016-02-16T12:45:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f646e04e147995ef11b6c81a09882df9a18d2ad6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263/commits","review_comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263/comments","review_comment_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/263/comments","statuses_url":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/9b5da873bcf84c72fa4c7aa09ff7d4925652c16e","head":{"label":"flovilmart:multiple-apps","ref":"multiple-apps","sha":"9b5da873bcf84c72fa4c7aa09ff7d4925652c16e","user":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"repo":{"id":51014025,"name":"parse-server","full_name":"flovilmart/parse-server","owner":{"login":"flovilmart","id":364568,"avatar_url":"https://avatars.githubusercontent.com/u/364568?v=3","gravatar_id":"","url":"https://api.github.com/users/flovilmart","html_url":"https://github.com/flovilmart","followers_url":"https://api.github.com/users/flovilmart/followers","following_url":"https://api.github.com/users/flovilmart/following{/other_user}","gists_url":"https://api.github.com/users/flovilmart/gists{/gist_id}","starred_url":"https://api.github.com/users/flovilmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flovilmart/subscriptions","organizations_url":"https://api.github.com/users/flovilmart/orgs","repos_url":"https://api.github.com/users/flovilmart/repos","events_url":"https://api.github.com/users/flovilmart/events{/privacy}","received_events_url":"https://api.github.com/users/flovilmart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flovilmart/parse-server","description":"Parse-compatible API server module for Node/Express","fork":true,"url":"https://api.github.com/repos/flovilmart/parse-server","forks_url":"https://api.github.com/repos/flovilmart/parse-server/forks","keys_url":"https://api.github.com/repos/flovilmart/parse-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flovilmart/parse-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flovilmart/parse-server/teams","hooks_url":"https://api.github.com/repos/flovilmart/parse-server/hooks","issue_events_url":"https://api.github.com/repos/flovilmart/parse-server/issues/events{/number}","events_url":"https://api.github.com/repos/flovilmart/parse-server/events","assignees_url":"https://api.github.com/repos/flovilmart/parse-server/assignees{/user}","branches_url":"https://api.github.com/repos/flovilmart/parse-server/branches{/branch}","tags_url":"https://api.github.com/repos/flovilmart/parse-server/tags","blobs_url":"https://api.github.com/repos/flovilmart/parse-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flovilmart/parse-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flovilmart/parse-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/flovilmart/parse-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flovilmart/parse-server/statuses/{sha}","languages_url":"https://api.github.com/repos/flovilmart/parse-server/languages","stargazers_url":"https://api.github.com/repos/flovilmart/parse-server/stargazers","contributors_url":"https://api.github.com/repos/flovilmart/parse-server/contributors","subscribers_url":"https://api.github.com/repos/flovilmart/parse-server/subscribers","subscription_url":"https://api.github.com/repos/flovilmart/parse-server/subscription","commits_url":"https://api.github.com/repos/flovilmart/parse-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/flovilmart/parse-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/flovilmart/parse-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/flovilmart/parse-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/flovilmart/parse-server/contents/{+path}","compare_url":"https://api.github.com/repos/flovilmart/parse-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flovilmart/parse-server/merges","archive_url":"https://api.github.com/repos/flovilmart/parse-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flovilmart/parse-server/downloads","issues_url":"https://api.github.com/repos/flovilmart/parse-server/issues{/number}","pulls_url":"https://api.github.com/repos/flovilmart/parse-server/pulls{/number}","milestones_url":"https://api.github.com/repos/flovilmart/parse-server/milestones{/number}","notifications_url":"https://api.github.com/repos/flovilmart/parse-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flovilmart/parse-server/labels{/name}","releases_url":"https://api.github.com/repos/flovilmart/parse-server/releases{/id}","deployments_url":"https://api.github.com/repos/flovilmart/parse-server/deployments","created_at":"2016-02-03T16:41:23Z","updated_at":"2016-02-16T04:14:08Z","pushed_at":"2016-02-16T03:44:59Z","git_url":"git://github.com/flovilmart/parse-server.git","ssh_url":"git@github.com:flovilmart/parse-server.git","clone_url":"https://github.com/flovilmart/parse-server.git","svn_url":"https://github.com/flovilmart/parse-server","homepage":null,"size":437,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"ParsePlatform:master","ref":"master","sha":"cf7202f80a4de8945f5353ed6a2e66c683f7b58d","user":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":50603846,"name":"parse-server","full_name":"ParsePlatform/parse-server","owner":{"login":"ParsePlatform","id":1294580,"avatar_url":"https://avatars.githubusercontent.com/u/1294580?v=3","gravatar_id":"","url":"https://api.github.com/users/ParsePlatform","html_url":"https://github.com/ParsePlatform","followers_url":"https://api.github.com/users/ParsePlatform/followers","following_url":"https://api.github.com/users/ParsePlatform/following{/other_user}","gists_url":"https://api.github.com/users/ParsePlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/ParsePlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ParsePlatform/subscriptions","organizations_url":"https://api.github.com/users/ParsePlatform/orgs","repos_url":"https://api.github.com/users/ParsePlatform/repos","events_url":"https://api.github.com/users/ParsePlatform/events{/privacy}","received_events_url":"https://api.github.com/users/ParsePlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ParsePlatform/parse-server","description":"Parse-compatible API server module for Node/Express","fork":false,"url":"https://api.github.com/repos/ParsePlatform/parse-server","forks_url":"https://api.github.com/repos/ParsePlatform/parse-server/forks","keys_url":"https://api.github.com/repos/ParsePlatform/parse-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ParsePlatform/parse-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ParsePlatform/parse-server/teams","hooks_url":"https://api.github.com/repos/ParsePlatform/parse-server/hooks","issue_events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/events{/number}","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/events","assignees_url":"https://api.github.com/repos/ParsePlatform/parse-server/assignees{/user}","branches_url":"https://api.github.com/repos/ParsePlatform/parse-server/branches{/branch}","tags_url":"https://api.github.com/repos/ParsePlatform/parse-server/tags","blobs_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/{sha}","languages_url":"https://api.github.com/repos/ParsePlatform/parse-server/languages","stargazers_url":"https://api.github.com/repos/ParsePlatform/parse-server/stargazers","contributors_url":"https://api.github.com/repos/ParsePlatform/parse-server/contributors","subscribers_url":"https://api.github.com/repos/ParsePlatform/parse-server/subscribers","subscription_url":"https://api.github.com/repos/ParsePlatform/parse-server/subscription","commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ParsePlatform/parse-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ParsePlatform/parse-server/contents/{+path}","compare_url":"https://api.github.com/repos/ParsePlatform/parse-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ParsePlatform/parse-server/merges","archive_url":"https://api.github.com/repos/ParsePlatform/parse-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ParsePlatform/parse-server/downloads","issues_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues{/number}","pulls_url":"https://api.github.com/repos/ParsePlatform/parse-server/pulls{/number}","milestones_url":"https://api.github.com/repos/ParsePlatform/parse-server/milestones{/number}","notifications_url":"https://api.github.com/repos/ParsePlatform/parse-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/labels{/name}","releases_url":"https://api.github.com/repos/ParsePlatform/parse-server/releases{/id}","deployments_url":"https://api.github.com/repos/ParsePlatform/parse-server/deployments","created_at":"2016-01-28T18:29:14Z","updated_at":"2016-02-16T12:40:52Z","pushed_at":"2016-02-16T03:46:07Z","git_url":"git://github.com/ParsePlatform/parse-server.git","ssh_url":"git@github.com:ParsePlatform/parse-server.git","clone_url":"https://github.com/ParsePlatform/parse-server.git","svn_url":"https://github.com/ParsePlatform/parse-server","homepage":null,"size":1346,"stargazers_count":5990,"watchers_count":5990,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1165,"mirror_url":null,"open_issues_count":136,"forks":1165,"open_issues":136,"watchers":5990,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263"},"html":{"href":"https://github.com/ParsePlatform/parse-server/pull/263"},"issue":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/issues/263"},"comments":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/issues/263/comments"},"review_comments":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263/comments"},"review_comment":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/pulls/263/commits"},"statuses":{"href":"https://api.github.com/repos/ParsePlatform/parse-server/statuses/9b5da873bcf84c72fa4c7aa09ff7d4925652c16e"}}}}