我创建了一个node.js服务器.当我使用端口3000进入localhost时,它只显示没有css或
javascript的文本.我尝试过几种可以解决其他问题的解决方案.但他们没有为我工作.
我的文件顺序是这样的
server.js
index.html
public
css
style.css
这是服务器的代码
var express = require(express);
var app = express();
app.get(/, function(req, res) {
res.sendFile(__dirname + /index.html);});
app.use(express.static(__dirname + public));
app.listen(3000);
这些是错误
GET http://localhost:3000/ [HTTP/1.1 304 Not Modified 11ms]
GET http://localhost:3000/public/css/demo.css [HTTP/1.1 404 Not Found 10ms]
GET http://localhost:3000/public/css/themes/popclip.css [HTTP/1.1 404 Not Found 10ms]
GET http://localhost:3000/public/css/reveal.min.css [HTTP/1.1 404 Not Found 19ms]
GET http://localhost:3000/public/css/theme/default.css [HTTP/1.