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){

Index.html code

<!  DOCTYPE html>
 <meta charset="utf-8">
 <!  -introduction of echarts.js -- >
 <script src="echarts.js"></script>
 <!  -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.

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