<!DOCTYPE html><html><head> <!-- <script src="https://d3js.org/d3.v4.min.js"></script> --> <script src="./d3/d3.min.js"></script></head><body> <script> d3.select("body") .append("h1") .text("hello world!"); </script></body></html>
var http = require('http');var fs = require('fs');
http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/html'}); fs.readFile('index.html', function(error, data) { if(error){ response.writeHead(404); response.write('File not found'); }else{ response.write(data); } response.end(); });}).listen(8080);