{"action":"created","issue":{"url":"https://api.github.com/repos/mexe/html-server/issues/6","repository_url":"https://api.github.com/repos/mexe/html-server","labels_url":"https://api.github.com/repos/mexe/html-server/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/mexe/html-server/issues/6/comments","events_url":"https://api.github.com/repos/mexe/html-server/issues/6/events","html_url":"https://github.com/mexe/html-server/pull/6","id":26296688,"node_id":"MDExOlB1bGxSZXF1ZXN0MTE4NzUzMzI=","number":6,"title":"Get rid of the config.json","user":{"login":"vitkarpov","id":3001791,"node_id":"MDQ6VXNlcjMwMDE3OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3001791?v=4","gravatar_id":"","url":"https://api.github.com/users/vitkarpov","html_url":"https://github.com/vitkarpov","followers_url":"https://api.github.com/users/vitkarpov/followers","following_url":"https://api.github.com/users/vitkarpov/following{/other_user}","gists_url":"https://api.github.com/users/vitkarpov/gists{/gist_id}","starred_url":"https://api.github.com/users/vitkarpov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitkarpov/subscriptions","organizations_url":"https://api.github.com/users/vitkarpov/orgs","repos_url":"https://api.github.com/users/vitkarpov/repos","events_url":"https://api.github.com/users/vitkarpov/events{/privacy}","received_events_url":"https://api.github.com/users/vitkarpov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2014-01-25T17:11:47Z","updated_at":"2018-11-21T12:42:16Z","closed_at":"2018-11-21T12:42:16Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mexe/html-server/pulls/6","html_url":"https://github.com/mexe/html-server/pull/6","diff_url":"https://github.com/mexe/html-server/pull/6.diff","patch_url":"https://github.com/mexe/html-server/pull/6.patch"},"body":"So, what is it all about.\n\nI found that `server.config.json` is really overwhelming.\nCommon project structure for html-guy is \"all content in one folder\": css, js, fonts, dummy, ... , index.html, news.html, ...\n\nSo, it's really convenient to specify just a basepath for all that stuff. And this data could be retrieved from the CLI.\n\nFor instance,\n\n```\n$ node ./node_modules/html-server/server.js -port=8000 -basepath=build/\n```\n\nIn this case server will resolve all absolute paths '/' relative to the specified basepath. It works like unix's `cd`.\n\nIf you set `-basepath=build/` it would be resolved relative to the current local folder (folder with your project, where server's running), and `-basepath=/build/` would be resoved to the root of your filesystem.\n\nAlso, I think that rule `/:page` for router is one possible, and it's not necessary to specify ext for pages — it's always `html`. \n"},"comment":{"url":"https://api.github.com/repos/mexe/html-server/issues/comments/440649314","html_url":"https://github.com/mexe/html-server/pull/6#issuecomment-440649314","issue_url":"https://api.github.com/repos/mexe/html-server/issues/6","id":440649314,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDY0OTMxNA==","user":{"login":"vitkarpov","id":3001791,"node_id":"MDQ6VXNlcjMwMDE3OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3001791?v=4","gravatar_id":"","url":"https://api.github.com/users/vitkarpov","html_url":"https://github.com/vitkarpov","followers_url":"https://api.github.com/users/vitkarpov/followers","following_url":"https://api.github.com/users/vitkarpov/following{/other_user}","gists_url":"https://api.github.com/users/vitkarpov/gists{/gist_id}","starred_url":"https://api.github.com/users/vitkarpov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitkarpov/subscriptions","organizations_url":"https://api.github.com/users/vitkarpov/orgs","repos_url":"https://api.github.com/users/vitkarpov/repos","events_url":"https://api.github.com/users/vitkarpov/events{/privacy}","received_events_url":"https://api.github.com/users/vitkarpov/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T12:42:16Z","updated_at":"2018-11-21T12:42:16Z","author_association":"NONE","body":"I guess irrelevant PR :-) No problem!"}}
{"actor":{"display_login":"vitkarpov"}}