Created
March 11, 2018 19:52
-
-
Save Colour-Full/223ad06ea72cb2a3838f1c1257ad34b2 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
// Export our app routes | |
exports = module.exports = function (app) { | |
// Set up the default app route to http://localhost:3000/index.html | |
app.get('/index.html', function (req, res) { | |
// Render some simple boilerplate html | |
function renderFullPage() { | |
// Note the div class name here, we will use that as a hook for our React code | |
// We are also adding the bundled javascript code | |
return ` | |
<!doctype html> | |
<html> | |
<head> | |
<title>Keystone With React And Redux</title> | |
</head> | |
<body> | |
<div class="react-container"> | |
</div> | |
<script src="bundle.js"></script> | |
</body> | |
</html> | |
`; | |
} | |
// Send the html boilerplate | |
res.send(renderFullPage()); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment