父目錄,至於到目錄引用而言,我理解引用在HTML
./ = current
../ = parent
,但我有我的參考目錄bower_components
在該位的HTML代碼的問題。對lib
文件夾的引用工作正常,但不是bower_components
。我錯過了什麼?
main.html中
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script src="lib/jquery/dist/jquery.min.js"></script>
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
</body>
</html>
是什麼在'server.js'?我的猜測是,它實現了更多或更少的樣板中間件,用於從其「public」目錄提供靜態文件(CSS,客戶端js等),但不是來自「bower_components」目錄。至於路徑部分,'../ bower_components/foo/bar'非常好。 – raina77ow
檢查(最有可能)[相關問題](http://stackoverflow.com/questions/21821773/configure-node-express-to-serve-static-bower-components)。 – raina77ow
明白了。謝謝@ raina77ow – Emanuel