var express = require('express')
var app = require('express')();
var server = require('http').Server(app);
var fs = require('fs');

app.get('/',(req,res)=>{
console.log(111);
var content = fs.readFileSync('./view/666.html');
res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8' });
res.write(content);
res.end();
//res.send('Hello')
})
app.post('/list',(req,res)=>{
console.log('list');
var content = fs.readFileSync('./view/777.html');
res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8' });
res.write(content);
res.end();
})
server.listen(1234,function () {
console.log('已经启动 port 1234');

})

这个get/post后面 根据传来的字符串 决定返回什么就行了