text: var express = require("express");
  
  var router = express.Router();
  
  var burger = require("../models/burger");
  
  router.get("/", function(req, res) {
      burger.selectAll(function(data) {
        var hbsObject = {
          burger: data
        };
        console.log(hbsObject);
        res.render("index", hbsObject);
      });
    });
    
    router.post("/api/burger", function(req, res) {
      burger.insertOne([
        req.body.burger_name
      ], function(result) {
        res.json({ id: result.insertId });
      });
    });
    
    router.put("/api/burger/:id", function(req, res) {
      var condition = "id = " + req.params.id;
    
      console.log("condition", condition);
    
      burger.updateOne({
        devoured: true
      }, condition, function(result) {
        if (result.changedRows == 0) {
          return res.status(404).end();
        } else {
          res.status(200).end();
        }
      });
    });
  
    module.exports = router