improve dev server readability by putting most of the client bootstrap functionality into a server-side function which gets toStringed and sent to the client