text: var express = require("express");
  var app = express();
  var cfenv = require("cfenv");
  var bodyParser = require('body-parser')
  
  // parse application/x-www-form-urlencoded
  app.use(bodyParser.urlencoded({ extended: false }))
  
  // parse application/json
  app.use(bodyParser.json())
  
  /* Endpoint to greet and add a new visitor to database.
  * Send a POST request to localhost:3000/api/visitors with body
  * {
  *   "name": "Bob"
  * }
  */
  app.post("/api/visitors", function (request, response) {
    var userName = request.body.name;
    var doc = { "name" : userName };
    if(!mydb) {
      console.log("No database.");
      response.send(doc);
      return;
    }
    insertOne[vendor](doc, response);
  });
  
  /**
   * Endpoint to get a JSON array of all the visitors in the database
   * REST API example:
   * <code>
   * GET http://localhost:3000/api/visitors
   * </code>
   *
   * Response:
   * [ "Bob", "Jane" ]
   * @return An array of all the visitor names
   */
  app.get("/api/visitors", function (request, response) {
      response.json("{'names':'hello'}");
      return;
  });
  
  // load local VCAP configuration  and service credentials
  var vcapLocal;
  try {
    vcapLocal = require('./vcap-local.json');
    console.log("Loaded local VCAP", vcapLocal);
  } catch (e) { }
  
  const appEnvOpts = vcapLocal ? { vcap: vcapLocal} : {}
  
  const appEnv = cfenv.getAppEnv(appEnvOpts);
  
  //serve static file (index.html, images, css)
  app.use(express.static(__dirname + '/views/HelloQuantum'));
  
  
  
  var port = process.env.PORT || 3000
  app.listen(port, function() {
      console.log("To view your app, open this link in your browser: http://localhost:" + port);
  });
  