javascript - TypeError: header name must be a valid http token in nodejs -


this code

var http = require('http'); var hostname = 'localhost'; var port = 3000;  var server = http.createserver(function (req,res) {     console.log(req.headers);     res.writehead(200,{'content-type':'text/html'});     res.end('<h1>this hello word</h1>'); });  server.listen(port,hostname,function () {     console.log(`server running @ http://${hostname}:${port}/`); }); 

error have got, node version use v4.4.7 enter image description here


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -