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}/`); });
Comments
Post a Comment