我正在使用快速生成器做一个网页,我有三页玉,但当我想从一个到另一个时,它显示我这个错误:
Error: Not Found
at app.use.res.render.message (F:\NodeJSPortable\Data\letstalksaku\app.js:39:13)
at Layer.handle [as handle_request] (F:\NodeJSPortable\Data\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (F:\NodeJSPortable\Data\node_modules\express\lib\router\index.js:312:13)
at F:\NodeJSPortable\Data\node_modules\express\lib\router\index.js:280:7
at Function.process_params (F:\NodeJSPortable\Data\node_modules\express\lib\router\index.js:330:12)
at next (F:\NodeJSPortable\Data\node_modules\express\lib\router\index.js:271:10)
at SendStream.error (F:\NodeJSPortable\Data\node_modules\express\node_modules\serve-static\index.js:120:7)
at SendStream.emit (events.js:95:17)
at SendStream.error (F:\NodeJSPortable\Data\node_modules\express\node_modules\send\index.js:245:17)
at SendStream.onStatError (F:\NodeJSPortable\Data\node_modules\express\node_modules\send\index.js:356:12)
这是来自app.js的代码:
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var fs = require('fs');
var https = require('https'),
http = require('http');
var routes = require('./routes/index');
var users = require('./routes/users');
var index2 = require('./routes/index2');
var app = express();
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
require('./routes')(app);
module.exports = app;
https.createServer({key: privateKey, cert: certificate}, app).listen(8000);
http.createServer(app).listen(8001);
console.log('running on https://localhost:8000 and http://localhost:8001');
我的玉文件只有这个代码
doctype html
html
head
body
a#Boton1(href='/index2') Crea tu sala
我找不到错误,请你帮帮我