我有一个工作项目,但我决定尝试视觉节点(http://www.visualnode.info/readme)以便在Visual Studio环境中使用node.js。使用视觉节点原因快递不提供静态文件
出于某种原因,该行不会影响快递为静态文件:
app.use(express.static(path.join(__dirname, 'client')));
当尝试:
res.sendfile('client/views/index.html');
引擎搜索下错了路径的文件:
404 Error: ENOENT, stat 'C:\Windows\system32\client\views\index.html'
问题是'C:\Windows\system32\'
从哪里来的?
而不是,应该有我的项目文件夹。
希望他们会得到它修复。感谢解决方案! – ohadinho