自制替换模板 template.js var fs = require('fs') var http = require('http') var server = http.createServer() var wwwDir = 'D:/vuejs/nodejs/day2' server.on('request', function (req, res) { var url = req.url fs.readFile('./template.html', function ( err, data…