【发布时间】:2020-11-02 03:56:53
【问题描述】:
我正在尝试使用 html 完成调查页面的统计信息 当我尝试连接到网页的 ejs 视图时,它给了我无法 GET /showResults
// Entry point for the application
// express application
var express = require('express');
// require the controller we make
var surveyController = require('./surveyController');
var app = express();
// set up template engine
app.set('view engine', 'ejs');
// static file serving
app.use(express.static('./public'));
// fire function from surveyController
surveyController(app);
// listen to port
app.listen(8080);
console.log('listening port 8080');
我有一个网页和 app.js 文件的 HTML 视图,似乎在控制台上运行,但是当我登录 http://localhost:8080/showResults 时出现错误
【问题讨论】: