【发布时间】:2014-12-04 01:56:52
【问题描述】:
我的 index.html 文件如下所示
<html>
<body>
<script src="public/jquery-latest-min.js"></script>
/*But this script file is not importing and creating error */
</body>
</html>
app.js 代码是
var express = require('express'),
app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server);
server.listen(3000);
app.get('/',function(req, res){
res.sendfile(__dirname + '/index.html');
});
index.html 文件如何为位于 public 文件夹中的 jquery 文件提供服务。
而我的项目结构是:
|-index.html
|-app.js
|-public/jquery-latest-min.js
【问题讨论】: