fontello-mount v2.0.41
fontello-mount
mount fontello assets in a http route without files
example
var http = require('http')
var mount = require('fontello-mount')
var config = require('./fontello-config')
mount(config, start)
function start (err, fontello) {
var server = http.createServer()
server.on('request', function (q, r)
log(q, r)
if (index(q, r)) return
if (fontello(q, r)) return
notFound(q, r)
})
server.listen(1600, console.log.bind(console, 'running http://localhost:1600'))
}
methods
mount(config, opt, cb)
config
json or string (fontello config.json contents)
opt
optional options cachePath
or cache
for custom cache
if opt.cachePath
is specified cache to disk will be attempted using a
hash of the fontello config as key
cb
function(err, router, assets)
assets
contains files and types from fontello assets
install
With npm do:
npm install fontello-mount
license
MIT
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago