Sunday 8 April 2018

Does express package use different font than http while sending out text?

I have two pieces of server implemented below, one using http[commented] and other using express. Running them both I realised that the text gets rendered differently in chrome. Is there a particular reason for it?//var http = require('http'); //http.createServer(function(req,res){ // res.writeHead(200,{ // 'Content-Type' : 'text/plain' // }); // res.end('Hello World\n'); //}).listen(3000, '127.0.0.1'); //console.log('Server running at http://127.0.0.1:3000/'); var express = require('express'); var app = express(); app.get('/', function(req,res){ res.send('Hello world!'); }); var server = app.listen(3000, function(){ console.log('Server runnig at http:127.0.0.1:3000/'); });

Submitted April 08, 2018 at 07:47PM by ML-newb

No comments:

Post a Comment