Wondering what’s next for npm?Check out our public roadmap! »

useful-express-partials

1.1.1 • Public • Published

useful-express-partials

A collection of useful Jade view partials for ExpressJS server: error reporting, analytics, etc.

npm install --save useful-express-partials

From the main layout Jade file include (assuming this jade file is in views/ subfolder of the project)

doctype html
html
  head
    meta(charset='utf-8')
    title #{title}
    include ../node_modules/useful-express-partials/partials/raygun-crash-reporter
    include ../node_modules/useful-express-partials/partials/heap-analytics
  body
    include partials/header
    .container
      block content

included partials

Look through the partials to see the expected variables that need to be injected when rendering the view. I suggest using render-vars to make sure each rendered views gets some common variables.

raygun-crash-reporter

Flexible client-side crash reporting, including commit and version tags.

heap-analytics

If the API key exists, includes the library code, plus tries to identify the user with email / name.

Small print

Author: Gleb Bahmutov © 2015 @bahmutov glebbahmutov.com glebbahmutov.com/blog

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet / open issue on Github

Install

npm i useful-express-partials

DownloadsWeekly Downloads

4

Version

1.1.1

License

MIT

Last publish

Collaborators

  • avatar