问题已经解决
问题党
/** * Created by xiongmingcai on 16/10/15.跑通前后端 */ var express = require("express"); var port = process.env.PORT || 3000; var app = express();// 启动web 服务器 //视图的根目录 app.set("views","./views"); // 设置默认的模板引擎); app.set('view engine','jade'); //路由器解析 index page app.get('/',function (req, res) { res.render('index',{ title: 'imooc 首页' }) }); app.listen(port); //路由器解析 detail page app.get('/movie/:ID',function (req, res) { res.render("detail",{ title: 'imooc 详情页' }) }); //路由器解析 admin page app.get('/admin/movie',function (req, res) { res.render("admin",{ title: 'imooc 后台录入页' }) }); //路由器解析 list page app.get('/admin/list',function (req, res) { res.render("list",{ title: 'imooc 列表页' }) }); console.log("http://127.0.0.1:" + port);