{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/936","labels_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/936/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/936/comments","events_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/936/events","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/936","id":79001698,"number":936,"title":"Initial attempt at a lightweight dynamic server","user":{"login":"toolness","id":124687,"avatar_url":"https://avatars.githubusercontent.com/u/124687?v=3","gravatar_id":"","url":"https://api.github.com/users/toolness","html_url":"https://github.com/toolness","followers_url":"https://api.github.com/users/toolness/followers","following_url":"https://api.github.com/users/toolness/following{/other_user}","gists_url":"https://api.github.com/users/toolness/gists{/gist_id}","starred_url":"https://api.github.com/users/toolness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toolness/subscriptions","organizations_url":"https://api.github.com/users/toolness/orgs","repos_url":"https://api.github.com/users/toolness/repos","events_url":"https://api.github.com/users/toolness/events{/privacy}","received_events_url":"https://api.github.com/users/toolness/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/labels/PR%20needs%20review","name":"PR needs review","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"mmmavis","id":2896608,"avatar_url":"https://avatars.githubusercontent.com/u/2896608?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmavis","html_url":"https://github.com/mmmavis","followers_url":"https://api.github.com/users/mmmavis/followers","following_url":"https://api.github.com/users/mmmavis/following{/other_user}","gists_url":"https://api.github.com/users/mmmavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmavis/subscriptions","organizations_url":"https://api.github.com/users/mmmavis/orgs","repos_url":"https://api.github.com/users/mmmavis/repos","events_url":"https://api.github.com/users/mmmavis/events{/privacy}","received_events_url":"https://api.github.com/users/mmmavis/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-05-21T13:45:32Z","updated_at":"2015-05-27T18:20:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/pulls/936","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/936","diff_url":"https://github.com/mozilla/teach.webmaker.org/pull/936.diff","patch_url":"https://github.com/mozilla/teach.webmaker.org/pull/936.patch"},"body":"**The current state of this WIP is deployed at https://teach-site.herokuapp.com/.**\r\n\r\nThis is intended to resolve #585.\r\n\r\nI'm thinking for now that we can just build it and use it alongside the existing static site  generator, and simply switch over once we decide it's stable and performant enough to use in production.\r\n\r\nTasks left to do (can be filed as separate issues):\r\n- [ ] Add proper error handling (e.g., \"500 Internal Server Error\") to the server.\r\n- [ ] The sitemap isn't currently being generated. This will take a bit of work, since the existing sitemap is generated by crawling all the `index.html` files of the static site, which isn't feasible for the dynamic server.\r\n- [ ] Appropriate static files (HTML, CSS, JS, etc) should be delivered as compressed/gzipped content, at least in production.\r\n- [ ] Static files should be delivered with reasonable cache headers, at least in production.\r\n- [ ] Assets should be delivered with relevant security headers (CSP, HSTS, etc.)\r\n- [x] All packages that aren't required for production deployment should be moved into the `devDependencies` section of `package.json`.\r\n- [ ] ~~Include the `git-rev` meta in generated pages.~~ Turns out this is really hard to do when an app is deployed to Heroku. We should probably just settle for showing the version number from `package.json` for now.\r\n- [x] Static files should all be copied into the `dist` directory via our gulpfile, rather than instantiating multiple `express.static()` middleware instances for each directory.\r\n- [x] Add some tests.\r\n- [x] react-router redirects should actually generate 302s from the server, rather than web pages telling non-JS users to visit the new location.\r\n"},"comment":{"url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/comments/106022216","html_url":"https://github.com/mozilla/teach.webmaker.org/pull/936#issuecomment-106022216","issue_url":"https://api.github.com/repos/mozilla/teach.webmaker.org/issues/936","id":106022216,"user":{"login":"mmmavis","id":2896608,"avatar_url":"https://avatars.githubusercontent.com/u/2896608?v=3","gravatar_id":"","url":"https://api.github.com/users/mmmavis","html_url":"https://github.com/mmmavis","followers_url":"https://api.github.com/users/mmmavis/followers","following_url":"https://api.github.com/users/mmmavis/following{/other_user}","gists_url":"https://api.github.com/users/mmmavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mmmavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmmavis/subscriptions","organizations_url":"https://api.github.com/users/mmmavis/orgs","repos_url":"https://api.github.com/users/mmmavis/repos","events_url":"https://api.github.com/users/mmmavis/events{/privacy}","received_events_url":"https://api.github.com/users/mmmavis/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T18:20:45Z","updated_at":"2015-05-27T18:20:45Z","body":"@toolness \r\n\r\nphew I finally started to review this PR, one quick question: does https://teach-site.herokuapp.com/ act like a PROD environment or STAGING/DEVELOPMENT?"}}