Use nodejs to display an html page but report an error in the browser console inside

  node.js, question

Use nodejs to display an html page but report an Unexpected token <

Js code is as follows

var http = require('http'),
 fs = require('fs');
 http.createServer(function(request, response) {
 response.writeHeader(200, {"Content-Type": "text/html"});
 fs.readFile("index.html",function (err,data){
 response.end(data);
 });
 }).listen(8000);

Index.html code

<!  DOCTYPE html>
 <html>
 <head>
 <meta charset="utf-8">
 <title>ECharts</title>
 <!  -introduction of echarts.js -- >
 <script src="echarts.js"></script>
 </head>
 <body>
 <!  -prepare a DOM with size (width and height) for ECharts->
 <div id="main" style="width: 600px;  height:400px;"  ></div>
 <script type="text/javascript">
 //Initialize the echarts instance based on the prepared dom.
 var myChart = echarts.init(document.getElementById('main'));
 
 //Specify configuration items and data for the chart
 var option = {
 title: {
 Text: 'ECharts getting started example'
 },
 tooltip: {},
 legend: {
 Data:[' sales volume']
 },
 xAxis: {
 Data: ["shirt", "sweater", "Shirts", "trousers", "high heels", "socks"]
 },
 yAxis: {},
 series: [{
 Name:' sales',
 type: 'bar',
 data: [5, 20, 36, 10, 10, 20]
 }]
 };
 
 //Use the configuration items and data just specified to display the chart.
 myChart.setOption(option);
 </script>
 </body>
 </html>

Here is the error prompt of the browser.

这里是浏览器的错误提示

This is the wrong location in sources in the browser console.

图片描述

It’s settled. It has nothing to do with the route. . .Content-TypeThe problem of