我在 /public 文件夹中有图像,我想显示它们..就像这样:<img src="a.jpg">
我的 app.js 代码
var express = require('express')
, app = express()
, http = require('http')
, server = http.createServer(app)
, io = require('socket.io').listen(server);
server.listen(8080);
app.use('/public', express.static(__dirname + "/public"));
如果我在本地主机中打开它,这个错误仍然显示
NetworkError: 404 Not Found - http://localhost:8080/public/a.jpg"