{"action":"created","comment":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/comments/39890030","id":39890030,"diff_hunk":"@@ -93,18 +93,30 @@ object Server {\n    * Pass [[None]] to the returned function to shutdown any running server and\n    * prevent new ones from being started.\n    */\n-  def servers(contentPath: String, idleTimeout: Duration, tester: BackendConfig => EnvTask[Unit],\n+  def servers(contentLoc: Option[String], contentPath: Option[String],\n+              idleTimeout: Duration, tester: BackendConfig => EnvTask[Unit],\n               mounter: Config => EnvTask[Backend], configWriter: Config => Task[Unit])\n              : (Process[Task, (Int, Http4sServer)], Option[(Int, Config)] => Task[Unit]) = {\n \n     val configQ = async.boundedQueue[Option[(Int, Config)]](2)(Strategy.DefaultStrategy)\n     val reload = (cfg: Config) => configQ.enqueueOne(Some((cfg.server.port, cfg)))\n \n+    val fileSvcs = contentPath match {\n+      case None =>\n+        ListMap(\n+          \"/\" -> redirectService(\"/welcome\"))\n+      case Some(fsPath) =>\n+        val urlPath = contentLoc.getOrElse(\"/files\")","path":"web/src/main/scala/quasar/api/server.scala","position":42,"original_position":42,"commit_id":"ca4f0eaebae6157a8eb7bf8b6eb602b888b98a80","original_commit_id":"ca4f0eaebae6157a8eb7bf8b6eb602b888b98a80","user":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"body":"I think moving the default content location value (`/files`) into the `Options` class below would make things clearer by moving the value closer to the option it is the default for.","created_at":"2015-09-18T19:05:29Z","updated_at":"2015-09-18T19:05:29Z","html_url":"https://github.com/slamdata/quasar/pull/929#discussion_r39890030","pull_request_url":"https://api.github.com/repos/slamdata/quasar/pulls/929","_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments/39890030"},"html":{"href":"https://github.com/slamdata/quasar/pull/929#discussion_r39890030"},"pull_request":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/929"}}},"pull_request":{"url":"https://api.github.com/repos/slamdata/quasar/pulls/929","id":45359472,"html_url":"https://github.com/slamdata/quasar/pull/929","diff_url":"https://github.com/slamdata/quasar/pull/929.diff","patch_url":"https://github.com/slamdata/quasar/pull/929.patch","issue_url":"https://api.github.com/repos/slamdata/quasar/issues/929","number":929,"state":"open","locked":false,"title":"make static file serving optional and parameterize the location","user":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"body":"SD-959 #done\r\n\r\nAdds a new parameter, `-L`, when launching the API server, which specifies the URL path static files should be served from. This will be used to configure the path to the front-end's files, without needing any knowledge hard-coded in the server.\r\n\r\nAdds a new page at `/welcome`, to which `/` is redirected if no static files are being served. This will be a default landing page for users starting the bare server, and would be a good place to host some simple tips about how to get started, or links to documentation, etc. For now, it's just a tiny page showing the version.\r\n\r\nFixed an infinite HTTP redirect loop when static files aren't present.","created_at":"2015-09-18T01:02:13Z","updated_at":"2015-09-18T19:05:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a06bea92bf8c2bcabdacb7d7c0c75037809a157","assignee":{"login":"wemrysi","id":32185,"avatar_url":"https://avatars.githubusercontent.com/u/32185?v=3","gravatar_id":"","url":"https://api.github.com/users/wemrysi","html_url":"https://github.com/wemrysi","followers_url":"https://api.github.com/users/wemrysi/followers","following_url":"https://api.github.com/users/wemrysi/following{/other_user}","gists_url":"https://api.github.com/users/wemrysi/gists{/gist_id}","starred_url":"https://api.github.com/users/wemrysi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemrysi/subscriptions","organizations_url":"https://api.github.com/users/wemrysi/orgs","repos_url":"https://api.github.com/users/wemrysi/repos","events_url":"https://api.github.com/users/wemrysi/events{/privacy}","received_events_url":"https://api.github.com/users/wemrysi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/slamdata/quasar/pulls/929/commits","review_comments_url":"https://api.github.com/repos/slamdata/quasar/pulls/929/comments","review_comment_url":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slamdata/quasar/issues/929/comments","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/ca4f0eaebae6157a8eb7bf8b6eb602b888b98a80","head":{"label":"mossprescott:ready/SD-959","ref":"ready/SD-959","sha":"ca4f0eaebae6157a8eb7bf8b6eb602b888b98a80","user":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"repo":{"id":21178367,"name":"quasar","full_name":"mossprescott/quasar","owner":{"login":"mossprescott","id":6147371,"avatar_url":"https://avatars.githubusercontent.com/u/6147371?v=3","gravatar_id":"","url":"https://api.github.com/users/mossprescott","html_url":"https://github.com/mossprescott","followers_url":"https://api.github.com/users/mossprescott/followers","following_url":"https://api.github.com/users/mossprescott/following{/other_user}","gists_url":"https://api.github.com/users/mossprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/mossprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mossprescott/subscriptions","organizations_url":"https://api.github.com/users/mossprescott/orgs","repos_url":"https://api.github.com/users/mossprescott/repos","events_url":"https://api.github.com/users/mossprescott/events{/privacy}","received_events_url":"https://api.github.com/users/mossprescott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mossprescott/quasar","description":"The engine for SlamData","fork":true,"url":"https://api.github.com/repos/mossprescott/quasar","forks_url":"https://api.github.com/repos/mossprescott/quasar/forks","keys_url":"https://api.github.com/repos/mossprescott/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mossprescott/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mossprescott/quasar/teams","hooks_url":"https://api.github.com/repos/mossprescott/quasar/hooks","issue_events_url":"https://api.github.com/repos/mossprescott/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/mossprescott/quasar/events","assignees_url":"https://api.github.com/repos/mossprescott/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/mossprescott/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/mossprescott/quasar/tags","blobs_url":"https://api.github.com/repos/mossprescott/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mossprescott/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mossprescott/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/mossprescott/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mossprescott/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/mossprescott/quasar/languages","stargazers_url":"https://api.github.com/repos/mossprescott/quasar/stargazers","contributors_url":"https://api.github.com/repos/mossprescott/quasar/contributors","subscribers_url":"https://api.github.com/repos/mossprescott/quasar/subscribers","subscription_url":"https://api.github.com/repos/mossprescott/quasar/subscription","commits_url":"https://api.github.com/repos/mossprescott/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/mossprescott/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/mossprescott/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/mossprescott/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/mossprescott/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/mossprescott/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mossprescott/quasar/merges","archive_url":"https://api.github.com/repos/mossprescott/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mossprescott/quasar/downloads","issues_url":"https://api.github.com/repos/mossprescott/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/mossprescott/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/mossprescott/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/mossprescott/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mossprescott/quasar/labels{/name}","releases_url":"https://api.github.com/repos/mossprescott/quasar/releases{/id}","created_at":"2014-06-24T19:43:22Z","updated_at":"2015-09-14T21:35:18Z","pushed_at":"2015-09-18T16:56:16Z","git_url":"git://github.com/mossprescott/quasar.git","ssh_url":"git@github.com:mossprescott/quasar.git","clone_url":"https://github.com/mossprescott/quasar.git","svn_url":"https://github.com/mossprescott/quasar","homepage":null,"size":8275,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"CHECK-UPSTREAM-REPO"}},"base":{"label":"slamdata:master","ref":"master","sha":"8d011be00cf005aed0e2b688e6fae8edb8e3edec","user":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"repo":{"id":16515058,"name":"quasar","full_name":"slamdata/quasar","owner":{"login":"slamdata","id":5385602,"avatar_url":"https://avatars.githubusercontent.com/u/5385602?v=3","gravatar_id":"","url":"https://api.github.com/users/slamdata","html_url":"https://github.com/slamdata","followers_url":"https://api.github.com/users/slamdata/followers","following_url":"https://api.github.com/users/slamdata/following{/other_user}","gists_url":"https://api.github.com/users/slamdata/gists{/gist_id}","starred_url":"https://api.github.com/users/slamdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slamdata/subscriptions","organizations_url":"https://api.github.com/users/slamdata/orgs","repos_url":"https://api.github.com/users/slamdata/repos","events_url":"https://api.github.com/users/slamdata/events{/privacy}","received_events_url":"https://api.github.com/users/slamdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slamdata/quasar","description":"A NoSQL analytics engine that embraces post-relational analytics and pushes computation to the data.","fork":false,"url":"https://api.github.com/repos/slamdata/quasar","forks_url":"https://api.github.com/repos/slamdata/quasar/forks","keys_url":"https://api.github.com/repos/slamdata/quasar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slamdata/quasar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slamdata/quasar/teams","hooks_url":"https://api.github.com/repos/slamdata/quasar/hooks","issue_events_url":"https://api.github.com/repos/slamdata/quasar/issues/events{/number}","events_url":"https://api.github.com/repos/slamdata/quasar/events","assignees_url":"https://api.github.com/repos/slamdata/quasar/assignees{/user}","branches_url":"https://api.github.com/repos/slamdata/quasar/branches{/branch}","tags_url":"https://api.github.com/repos/slamdata/quasar/tags","blobs_url":"https://api.github.com/repos/slamdata/quasar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slamdata/quasar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slamdata/quasar/git/refs{/sha}","trees_url":"https://api.github.com/repos/slamdata/quasar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slamdata/quasar/statuses/{sha}","languages_url":"https://api.github.com/repos/slamdata/quasar/languages","stargazers_url":"https://api.github.com/repos/slamdata/quasar/stargazers","contributors_url":"https://api.github.com/repos/slamdata/quasar/contributors","subscribers_url":"https://api.github.com/repos/slamdata/quasar/subscribers","subscription_url":"https://api.github.com/repos/slamdata/quasar/subscription","commits_url":"https://api.github.com/repos/slamdata/quasar/commits{/sha}","git_commits_url":"https://api.github.com/repos/slamdata/quasar/git/commits{/sha}","comments_url":"https://api.github.com/repos/slamdata/quasar/comments{/number}","issue_comment_url":"https://api.github.com/repos/slamdata/quasar/issues/comments{/number}","contents_url":"https://api.github.com/repos/slamdata/quasar/contents/{+path}","compare_url":"https://api.github.com/repos/slamdata/quasar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slamdata/quasar/merges","archive_url":"https://api.github.com/repos/slamdata/quasar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slamdata/quasar/downloads","issues_url":"https://api.github.com/repos/slamdata/quasar/issues{/number}","pulls_url":"https://api.github.com/repos/slamdata/quasar/pulls{/number}","milestones_url":"https://api.github.com/repos/slamdata/quasar/milestones{/number}","notifications_url":"https://api.github.com/repos/slamdata/quasar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slamdata/quasar/labels{/name}","releases_url":"https://api.github.com/repos/slamdata/quasar/releases{/id}","created_at":"2014-02-04T15:01:27Z","updated_at":"2015-09-18T01:10:13Z","pushed_at":"2015-09-18T18:48:45Z","git_url":"git://github.com/slamdata/quasar.git","ssh_url":"git@github.com:slamdata/quasar.git","clone_url":"https://github.com/slamdata/quasar.git","svn_url":"https://github.com/slamdata/quasar","homepage":"","size":10781,"stargazers_count":144,"watchers_count":144,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":161,"forks":36,"open_issues":161,"watchers":144,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/929"},"html":{"href":"https://github.com/slamdata/quasar/pull/929"},"issue":{"href":"https://api.github.com/repos/slamdata/quasar/issues/929"},"comments":{"href":"https://api.github.com/repos/slamdata/quasar/issues/929/comments"},"review_comments":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/929/comments"},"review_comment":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slamdata/quasar/pulls/929/commits"},"statuses":{"href":"https://api.github.com/repos/slamdata/quasar/statuses/ca4f0eaebae6157a8eb7bf8b6eb602b888b98a80"}}}}