29 Oct 2013, 4:19pm

leave a comment

  • Anzeige
  • 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 folder. This folder 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 tested it with wget -O- http://localhost:3000/webfonts/somefont.woff … and *sur­prise* I got the HTML of the default page — not some binary gib­ber­ish that you would expect to find in a font file.

    All file types unknown to meteor get stripped out dur­ing com­pile time. Instead you need to put them in a sep­a­rate folder called public — in my case in /public/webfonts/somefont.woff. Rookie mis­take I guess. :)



    web site

    leave a comment