Q:

Canvas does not update in router.get method

This is my first time using a router in a Node.js app.  Typically, I would just write an HTML page, but here I'm using a Jade template.  My problem is that the page renders as it's written in Jade, without any of the changes to the canvas that I have written in the index.js script that you see here.  Is there a particular function to re-render the page with these changes? 
index.js:
var express = require('express');
var router = express. Router();

/* GET home page. */ 
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
  var canvas = document.getElementById("myCanvas");
  canvas.width = document.body.clientWidth;
  canvas.height = document.body.clientHeight;
  var context = canvas.getContext("2d");
  context.fillStyle = "#FF0000";
  context.fillRect(0,0,150,75);
});

module.exports = router;

index.jade:
extends layout

block content
  h1= title
  p Welcome to #{title}
  canvas#myCanvas(width='200', height='100', style='border:1px solid #000000;')

app.js:
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var routes = require('./routes/index');
var users = require('./routes/users');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', routes);
app.use('/users', users);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: err
    });
  });
}

// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
  res.status(err.status || 500);
  res.render('error', {
    message: err.message,
    error: {}
  });
});

module.exports = app;

A:

You can't access document object on server-side.  So as I can see you've already called bodyParser middleware in your app.js file, so now all you need to do is to give name to canvas in jade file canvas(name="myCanvas")

And in index.js access canvas from req.body:
router.get('/', function(req, res, next) {
    //req.body object contains your element
    var canvas = req.body.myCanvas;
    //...
    res.render('index', { title: 'Express' });
});

