From node js code , 6 Months ago, written in Text.
Embed
  1. var express = require('express');
  2. var app = express();
  3.  
  4. var ip = process.env.SERVER || 'localhost';
  5. var port = process.env.PORT || '84';
  6.  
  7. var keyValue = "Not Set";
  8.  
  9. app.get('/page/',function(req,res){
  10.         console.log(req.headers);
  11.         console.log("-------------------------------");
  12.         console.log(res.headers);
  13.         console.log("-------------------------------");
  14.         res.send({headerDetail : req.headers, keyValue : keyValue});
  15. })
  16.  
  17. app.listen(port, function(){
  18.         console.log((new Date()) + ', Server is listening on port ' + ip + ':' + port);
  19. });
  20.  
  21. console.log('Magic happens at http://' + ip + ':' + port);