Skip to content

Instantly share code, notes, and snippets.

@neftaly
Created March 26, 2015 09:39
Show Gist options
  • Select an option

  • Save neftaly/e3977aa5206ae04f6844 to your computer and use it in GitHub Desktop.

Select an option

Save neftaly/e3977aa5206ae04f6844 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }}</title>
<link href="./app.min.css" rel="stylesheet">
<script src="./app.min.js" defer></script>
</head>
<body>
<div id="app">{{{ output }}}</div>
<script type="application/javascript">
var initialState = {{{ state }}};
</script>
</body>
</html>
@neftaly
Copy link
Copy Markdown
Author

neftaly commented Mar 26, 2015

Server.js is just your node application server, handlebars, and a require/import pointing to myApp.js (with the right env etc passed through). I missed out some code passing the state object back, but that's all pretty simple.

Also, I just realized I used let a lot. I think it will instead become a best practice to use const for practically everything, by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment