title: Increment the counter each time someone connect to server
body: <p>Guys I have the following code which it supposed to increment a counter each time some one connect to server and post the message in the console but it increments only one time ,can you help me?</p>
  
  <pre><code>'use strict'
  //Require express
  var express=require('express');
  //Trigger express
  var app=express();
  var counter=0;
  //Set up the route URL
  app.get('/', function(req, res){
      res.send("&lt;h1&gt;You have connected&lt;/h1&gt;");
  });
  
  //set up the port
  app.listen(3000,function(){
  
  //increment counter
  
    counter+=1;
    console.log("you have connected " + counter + " times");
  })
  </code></pre>