クライアント側にリンクしたい/node_modules/jade/runtime.min.js
のですが、どうすれば公開してアクセスできるようになりますか?
どういうわけかそれのために作成しますapp.get
か?
app.get('/js/jade-runtime.js',<what goes here?>)
または、静的なものを変更して提供できるようにすることはできますか?
app.use(express.static(path.join(__dirname, 'public'))); // modify this to add more paths somehow
完全な解決策(Bradに感謝):
app.get('/js/jade-runtime.js',function(req,res) {
res.sendfile(path.join(__dirname,'node_modules','jade','runtime.min.js'));
});