Skip to content

Instantly share code, notes, and snippets.

@thescientist13
Last active September 13, 2018 20:24
Show Gist options
  • Save thescientist13/79fe17396e6f7c897a19eddf854f34b8 to your computer and use it in GitHub Desktop.
Save thescientist13/79fe17396e6f7c897a19eddf854f34b8 to your computer and use it in GitHub Desktop.
Example server.js for an Express app
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send(`
<html>
<head>
<title>SSR App</title>
</head>
<body>
<h1>Hello SSR World!</h1>
</body>
</html>
`);
});
app.listen(port, () => {
console.log(`SSR server started at http://localhost:${port}`);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment