faucet-pipeline / faucet-pipeline-express

express adapter for faucet-pipeline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

faucet-pipeline-express

npm

This is a middleware for Express to read the manifest file from faucet-pipeline and get access to it in your views. Initialize it with:

let faucet = require('faucet-pipeline-express');

// ...

app.use(faucet.middleware("./path-to-manifest.json"));

Inside your views you now have access to the assetURL function to read from your manifest:

head
    link(href=assetURL("assets/foo.css") rel="stylesheet" media="all")

See the example directory for a usage example with express and pug.

License

faucet-pipeline-express is licensed under Apache 2.0 License.

About

express adapter for faucet-pipeline

License:Apache License 2.0


Languages

Language:JavaScript 84.2%Language:Pug 8.2%Language:Shell 7.6%