Serving Static Files with Meteor and Spiderable

In short: To serve files which are not part of your project’s code (i.e. which are sup­posed to be served with­out being com­piled), put them in the public fold­er. This fold­er will be served from /.

Some more back­ground and details:
Tried to add a web-font to my project, thus, I put it in /client/webfonts/somefont.woff. But the font didn’t show up. I test­ed it with wget -O- http://localhost:3000/webfonts/somefont.woff … and *sur­prise* I got the HTML of the default page — not some bina­ry gib­ber­ish that you would expect to find in a font file. 

All file types unknown to mete­or get stripped out dur­ing com­pile time. Instead you need to put them in a sep­a­rate fold­er called public — in my case in /public/webfonts/somefont.woff. Rook­ie mis­take I guess. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *