From 1eaf7cdf77b1fd30fbb832a7d1f3f670bf411dc4 Mon Sep 17 00:00:00 2001 From: Farrukh Mamatkhalilov Date: Mon, 24 Dec 2018 15:18:13 +0500 Subject: [PATCH] changed var to const --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 460baa408..1c6e5a64c 100644 --- a/app.js +++ b/app.js @@ -1,4 +1,4 @@ -var http = require('http'), +const http = require('http'), path = require('path'), methods = require('methods'), express = require('express'), @@ -9,10 +9,10 @@ var http = require('http'), errorhandler = require('errorhandler'), mongoose = require('mongoose'); -var isProduction = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; // Create global app object -var app = express(); +const app = express(); app.use(cors()); @@ -79,6 +79,6 @@ app.use(function(err, req, res, next) { }); // finally, let's start our server... -var server = app.listen( process.env.PORT || 3000, function(){ +const server = app.listen( process.env.PORT || 3000, function(){ console.log('Listening on port ' + server.address().port); });