node.js - Including Bootstrap Glyphicons In Express -


i'm trying use glyphicons (via bootstrap) in express app. problem when i'm serving static files, glyphicons aren't included.

this directory (created grunt):

build     fonts        glyphicons-halflings.eot        ...     js        scripts.js     stylesheets        styles.css 

here app.js code:

app.use('/build/', express.static(path.join(__dirname, 'build/js'))); app.use('/build/', express.static(path.join(__dirname, 'build/stylesheets'))); app.use(express.static(path.join(__dirname, 'build/fonts'))); 

here error chrome:

users:1 http://localhost:3000/fonts/glyphicons-halflings-regular.woff 404 (not found) users:1 http://localhost:3000/fonts/glyphicons-halflings-regular.ttf 404 (not found)

i've tried switching

app.use('/build/', express.static(path.join(__dirname, 'build/fonts'))); 

but i'm pretty sure bootstrap looking ../fonts, dir can't quite same. in other words, bootstrap expecting structure so:

js/bootstrap.js fonts/glyphs 

where off?

thanks everyone!

just use following then:

app.use('/fonts/', express.static(path.join(__dirname, 'build/fonts'))); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -