Looking for a solution to the issue with the dollar answer (same problem). I have app.coffee:
pp.configure ->
publicDir = "#{__dirname}/public"
app.set "views", viewsDir
app.set "view engine", "jade"
app.use(stylus.middleware debug: true, src: viewsDir, dest: publicDir, compile: compileMethod)
app.use(express.static(publicDir))
compileMethod = (str, path) ->
stylus(str)
.set('filename', path)
.set('compress', true)
app.get "/pag",(req,res) ->
res.render "pag",
title: "test",
in /stylesheet/pag.jade:
...
link(rel='stylesheet', href='pag/css/bootstrap.min.css')
...
When I go to "myserver:9090/pag" the page does not load the bootstrap.min.css file. I am encountering the following error:
source :(my folder of projects)/views/pag/css/bootstrap.min.styl
dest : (my folder of projects)/public/pag/css/bootstrap.min.css
read : (my folder of projects)/views/pag/css/bootstrap.min.styl
Error: ENOENT, open '(my folder)/views/pag/css/bootstrap.min.styl'
Where did I go wrong? I might be missing something... Any suggestions?