You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
353 B
12 lines
353 B
var express = require('express');
|
|
var router = express.Router();
|
|
var vm = require("../vm.js");
|
|
|
|
/* GET home page. */
|
|
router.get('/', function(req, res, next) {
|
|
var query_params = req.query;
|
|
var evaluated = vm.evaluate(query_params.source);
|
|
res.render('index', { title: 'Express', output: JSON.stringify(evaluated)});
|
|
});
|
|
|
|
module.exports = router;
|
|
|