From 754621660e984c16eddc349e6ee8d6ff776a6d01 Mon Sep 17 00:00:00 2001 From: Maurits van der Schee Date: Tue, 17 Jan 2017 22:13:49 +0100 Subject: [PATCH] rename --- app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index c61d850..3d5499d 100644 --- a/app.js +++ b/app.js @@ -15,7 +15,7 @@ var pool = mysql.createPool({ // ensure request has database connection -var withConnection = function (handler) { +var withDb = function (handler) { return function (req, resp) { pool.getConnection(function (err, connection) { if (err) { @@ -46,7 +46,7 @@ var withBody = function (handler) { // main web handler -var server = http.createServer(withConnection(withBody(function (req, resp) { +var server = http.createServer(withDb(withBody(function (req, resp) { // get the HTTP method, path and body of the request var method = req.method;