2016-09-09 9 views
1

私はすでにこれを使って静的ファイルを提供しています。パブリックディレクトリが見つかりません(404)ExpressJSとJade

app.use(express.static(path.join(__dirname, 'public'))); 

これは、ここに私の構造である私のindex.jadeサンプル

// jQuery 
script(src='public/js/jquery.min.js') 
// jQuery Easing 
script(src='public/js/jquery.easing.1.3.js') 
// Bootstrap 
script(src='public/js/bootstrap.min.js') 
// Waypoints 
script(src='public/js/jquery.waypoints.min.js') 
// Stellar Parallax 
script(src='public/js/jquery.stellar.min.js') 
// Counter 
script(src='public/js/jquery.countTo.js') 
// Magnific Popup 
script(src='public/js/jquery.magnific-popup.min.js') 
script(src='public/js/magnific-popup-options.js') 
// Google Map 
script(src='https://maps.googleapis.com/maps/api/js?key=AIzaSyCefOgb1ZWqYtj7raVSmN4PL2WkTrc-KyA&sensor=false') 
script(src='public/js/google_map.js') 
// For demo purposes only styleswitcher (You may delete this anytime) 
script(src='public/js/jquery.style.switcher.js') 

です。ここで

enter image description here

私のコンソール上のエラーです。

enter image description here

誰も私がここでの問題の特定に役立つことはできますか?それは非常に高く評価されるだろう。

+1

'public'を' urls'から削除します。 –

答えて

1

script(src='/js/jquery.min.js')で十分です。 URLにpublicを指定する必要はありません。

関連する問題