Skip to content

Instantly share code, notes, and snippets.

@sj82516
Created December 17, 2015 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sj82516/b2e462eb441b5b311b05 to your computer and use it in GitHub Desktop.
Save sj82516/b2e462eb441b5b311b05 to your computer and use it in GitHub Desktop.
var express = require('express');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
var chartData = [];
for (var i = 0; i < 7; i++)
chartData.push(Math.random() * 50);
res.render('index', { title: 'Express', chartData: JSON.stringify(chartData) });
});
module.exports = router;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment