{"action":"created","issue":{"url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/186","repository_url":"https://api.github.com/repos/gmetais/YellowLabTools","labels_url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/186/comments","events_url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/186/events","html_url":"https://github.com/gmetais/YellowLabTools/pull/186","id":171695874,"number":186,"title":"Adding subfolder support","user":{"login":"JulienRamel","id":1608342,"avatar_url":"https://avatars.githubusercontent.com/u/1608342?v=3","gravatar_id":"","url":"https://api.github.com/users/JulienRamel","html_url":"https://github.com/JulienRamel","followers_url":"https://api.github.com/users/JulienRamel/followers","following_url":"https://api.github.com/users/JulienRamel/following{/other_user}","gists_url":"https://api.github.com/users/JulienRamel/gists{/gist_id}","starred_url":"https://api.github.com/users/JulienRamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JulienRamel/subscriptions","organizations_url":"https://api.github.com/users/JulienRamel/orgs","repos_url":"https://api.github.com/users/JulienRamel/repos","events_url":"https://api.github.com/users/JulienRamel/events{/privacy}","received_events_url":"https://api.github.com/users/JulienRamel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-17T16:01:16Z","updated_at":"2016-08-17T16:50:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gmetais/YellowLabTools/pulls/186","html_url":"https://github.com/gmetais/YellowLabTools/pull/186","diff_url":"https://github.com/gmetais/YellowLabTools/pull/186.diff","patch_url":"https://github.com/gmetais/YellowLabTools/pull/186.patch"},"body":"Hi @gmetais,\r\n\r\nI did some changes to the application to add a support of subfolder use, for example behind a reverse proxy. The application was not usable in /subfolder because of the absolute paths used for assets and by AngularJS for views.\r\n\r\nI added a \"baseUrl\" parameter in the settings file, by default set to \"/\". This parameter is injected in the <base> tag in the main HTML document. To be able to inject a parameter in the HTML, I added a HTML template engine named EJS. The static method from Express is still used for assets. Then I changed all the absolute paths for relative ones (assets, API, results, etc).\r\n\r\nThe scenario is to let \"/\" for a use on a domain without subfolder, and to configure the full URL for a subfolder (with a trailing slash). Example : \"https://domain.com/yellowlabtools\".\r\n\r\nIt's my first time working on NodeJS, Express, EJS and AngularJS, so feel free to let me comments about the development :-)\r\n\r\nI've tested on a reverse proxy on nginx and Apache."},"comment":{"url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/comments/240474147","html_url":"https://github.com/gmetais/YellowLabTools/pull/186#issuecomment-240474147","issue_url":"https://api.github.com/repos/gmetais/YellowLabTools/issues/186","id":240474147,"user":{"login":"gmetais","id":498031,"avatar_url":"https://avatars.githubusercontent.com/u/498031?v=3","gravatar_id":"","url":"https://api.github.com/users/gmetais","html_url":"https://github.com/gmetais","followers_url":"https://api.github.com/users/gmetais/followers","following_url":"https://api.github.com/users/gmetais/following{/other_user}","gists_url":"https://api.github.com/users/gmetais/gists{/gist_id}","starred_url":"https://api.github.com/users/gmetais/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmetais/subscriptions","organizations_url":"https://api.github.com/users/gmetais/orgs","repos_url":"https://api.github.com/users/gmetais/repos","events_url":"https://api.github.com/users/gmetais/events{/privacy}","received_events_url":"https://api.github.com/users/gmetais/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T16:50:21Z","updated_at":"2016-08-17T16:50:21Z","body":"Thanks a lot for this cool work!\r\n\r\nI marked a few details, please tell me if its unclear.\r\n\r\nUntil now I was using `grunt-replace` to insert variables into the templates (for 2 variables: `googleAnalyticsId` and `version`). EJS looks very simple and I'll replace grunt-replace :)"}}
{"actor":{"display_login":"gmetais"}}