{"action":"created","issue":{"url":"https://api.github.com/repos/mattdesl/budo/issues/60","labels_url":"https://api.github.com/repos/mattdesl/budo/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/mattdesl/budo/issues/60/comments","events_url":"https://api.github.com/repos/mattdesl/budo/issues/60/events","html_url":"https://github.com/mattdesl/budo/issues/60","id":106241587,"number":60,"title":"feature: write all router paths to disk","user":{"login":"yoshuawuyts","id":2467194,"avatar_url":"https://avatars.githubusercontent.com/u/2467194?v=3","gravatar_id":"","url":"https://api.github.com/users/yoshuawuyts","html_url":"https://github.com/yoshuawuyts","followers_url":"https://api.github.com/users/yoshuawuyts/followers","following_url":"https://api.github.com/users/yoshuawuyts/following{/other_user}","gists_url":"https://api.github.com/users/yoshuawuyts/gists{/gist_id}","starred_url":"https://api.github.com/users/yoshuawuyts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoshuawuyts/subscriptions","organizations_url":"https://api.github.com/users/yoshuawuyts/orgs","repos_url":"https://api.github.com/users/yoshuawuyts/repos","events_url":"https://api.github.com/users/yoshuawuyts/events{/privacy}","received_events_url":"https://api.github.com/users/yoshuawuyts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-13T21:38:41Z","updated_at":"2015-09-13T22:39:39Z","closed_at":null,"body":"It might be cool if `budo`'s routes were able to be persisted to disk. This would allow users to prototype using a live-reloading environment, and once they're happy with the results store the output to disk and deploy it to GH-pages.\r\n\r\nCurrently the following modules are available to do this:\r\n- [wayfarer](https://github.com/wayfarer) - generic radix-trie router\r\n- [wayfarer-to-server](https://github.com/wayfarer-to-server) - server-side wrapper for wayfarer adding HTTP method support\r\n- [wayfarer-to-fs](https://github.com/wayfarer-to-fs) - write `wayfarer-to-server` paths to disk\r\n\r\nUsage looks like this:\r\n```js\r\nconst toServer = require('wayfarer-to-server')\r\nconst toFs = require('wayfarer-to-fs')\r\nconst wayfarer = require('wayfarer')\r\n\r\nconst router = toServer(wayfarer())\r\nrouter.on('/', {\r\n  get: (req, res) => fs.createReadStream(__dirname + '/index.html').pipe(res))\r\n})\r\n\r\ntoFs(router, __dirname + '/dist', (err) => {\r\n  if (err) throw err\r\n})\r\n```\r\nWhat do you think of adding such functionality to `budo`?"},"comment":{"url":"https://api.github.com/repos/mattdesl/budo/issues/comments/139925947","html_url":"https://github.com/mattdesl/budo/issues/60#issuecomment-139925947","issue_url":"https://api.github.com/repos/mattdesl/budo/issues/60","id":139925947,"user":{"login":"mattdesl","id":1383811,"avatar_url":"https://avatars.githubusercontent.com/u/1383811?v=3","gravatar_id":"","url":"https://api.github.com/users/mattdesl","html_url":"https://github.com/mattdesl","followers_url":"https://api.github.com/users/mattdesl/followers","following_url":"https://api.github.com/users/mattdesl/following{/other_user}","gists_url":"https://api.github.com/users/mattdesl/gists{/gist_id}","starred_url":"https://api.github.com/users/mattdesl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattdesl/subscriptions","organizations_url":"https://api.github.com/users/mattdesl/orgs","repos_url":"https://api.github.com/users/mattdesl/repos","events_url":"https://api.github.com/users/mattdesl/events{/privacy}","received_events_url":"https://api.github.com/users/mattdesl/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T22:39:39Z","updated_at":"2015-09-13T22:39:39Z","body":"How might this look with regard to budo? I'm trying to envision how a small GH pages site/demo like [this](https://github.com/mattdesl/three-glslify-example/blob/434984fda60eaec8335782607fb2e3c19c15119e/package.json#L27-L28) could use `wayfarer-to-server` to avoid having to manually write the `index.html` and browserify + uglify the `bundle.js` (unless I'm mistaken about the goals of this?).\r\n\r\nCan you give example of other routes that might be worth persisting? "}}