Skip to content

Instantly share code, notes, and snippets.

@robertklep
Created June 10, 2013 15:51
Show Gist options
  • Save robertklep/5749850 to your computer and use it in GitHub Desktop.
Save robertklep/5749850 to your computer and use it in GitHub Desktop.
<h1>Anonymous</h1>
var express = require('express');
var app = express.createServer();
app.set('view engine', 'ejs');
app.set('views', __dirname);
app.set('view options', { layout: true });
app.get('/loggedin', function(req, res) {
res.render('loggedin');
});
app.get('/anon', function(req, res) {
res.render('anon');
});
app.listen(3012);
<p>This is your layout page, which contains your basic layout.</p>
<p>The following block is specific for the route:</p>
<%- body %>
<h1>Logged in</h1>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment