Created
March 26, 2015 09:39
-
-
Save neftaly/e3977aa5206ae04f6844 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
leta lot. I think it will instead become a best practice to useconstfor practically everything, by default.