{"action":"created","issue":{"url":"https://api.github.com/repos/mattkrick/meatier/issues/115","repository_url":"https://api.github.com/repos/mattkrick/meatier","labels_url":"https://api.github.com/repos/mattkrick/meatier/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/mattkrick/meatier/issues/115/comments","events_url":"https://api.github.com/repos/mattkrick/meatier/issues/115/events","html_url":"https://github.com/mattkrick/meatier/issues/115","id":140627063,"number":115,"title":"Wishlist feature: server hot-reload","user":{"login":"wmertens","id":54934,"avatar_url":"https://avatars.githubusercontent.com/u/54934?v=3","gravatar_id":"","url":"https://api.github.com/users/wmertens","html_url":"https://github.com/wmertens","followers_url":"https://api.github.com/users/wmertens/followers","following_url":"https://api.github.com/users/wmertens/following{/other_user}","gists_url":"https://api.github.com/users/wmertens/gists{/gist_id}","starred_url":"https://api.github.com/users/wmertens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmertens/subscriptions","organizations_url":"https://api.github.com/users/wmertens/orgs","repos_url":"https://api.github.com/users/wmertens/repos","events_url":"https://api.github.com/users/wmertens/events{/privacy}","received_events_url":"https://api.github.com/users/wmertens/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-14T09:59:24Z","updated_at":"2016-05-17T06:16:12Z","closed_at":"2016-04-19T16:11:05Z","body":"See http://jlongster.com/Backend-Apps-with-Webpack--Part-III - being able to hot reload the graphql handlers without losing connections to databases etc sounds like it would make meatier SUPER AWESOME :hamburger: :fire: \r\n"},"comment":{"url":"https://api.github.com/repos/mattkrick/meatier/issues/comments/219628799","html_url":"https://github.com/mattkrick/meatier/issues/115#issuecomment-219628799","issue_url":"https://api.github.com/repos/mattkrick/meatier/issues/115","id":219628799,"user":{"login":"wmertens","id":54934,"avatar_url":"https://avatars.githubusercontent.com/u/54934?v=3","gravatar_id":"","url":"https://api.github.com/users/wmertens","html_url":"https://github.com/wmertens","followers_url":"https://api.github.com/users/wmertens/followers","following_url":"https://api.github.com/users/wmertens/following{/other_user}","gists_url":"https://api.github.com/users/wmertens/gists{/gist_id}","starred_url":"https://api.github.com/users/wmertens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmertens/subscriptions","organizations_url":"https://api.github.com/users/wmertens/orgs","repos_url":"https://api.github.com/users/wmertens/repos","events_url":"https://api.github.com/users/wmertens/events{/privacy}","received_events_url":"https://api.github.com/users/wmertens/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T06:16:12Z","updated_at":"2016-05-17T06:16:12Z","body":"Ok, so elaboration time:\r\n\r\n* Suppose you load the entire server the way the client is loaded\r\n  * This means that you get the same loader results, e.g. URLs for images, objects for css-modules, code for javascript\r\n  * This means you can run client code and it will get the same results => prerendering\r\n  * This means you don't need to create a bundle first\r\n* Now add hot reloading to the mix\r\n  * If the module is hot-reloadable, do so, otherwise die and let a wrapper restart the app\r\n  * The next client prerender or API call will use the new code, but the database connections will persist\r\n* If the loader can store and reference built modules, restarts are fast\r\n\r\nI couldn't get Webpack to work because I couldn't convince it to leave requires of node_modules alone, but maybe it can be done.\r\n\r\nJSPM 0.17 should be able to do it, since that is a loader first and a bundler second, and they are at least planning to store build results keyed by input hash.\r\n\r\nAs an aside, NixOS.org is a Linux distribution based on storing packages immutably under their input hash (source, build scripts, compiler, flags, …), and generally it takes only a few seconds to create a new version of the entire OS when you change some setting. In other words, caching load results based on a hash of their loader and the input source should lead to super fast restarts."}}