本地输入
http://127.0.0.1:3000/
//调用模块
var express = require('express');
function createTimestamp() {
var name="你猜猜";
return name;
}
//固定写法
var app = express();
var path = require("path");
app.use("/", express.static(path.join(process.cwd(), "www_root")));
app.get('/', function (req, res) {
res.send(createTimestamp())
});
app.listen(3000);//端口