RuntimeTools / appmetrics-dash

A data visualizer that uses " Node Application Metrics" (appmetrics) to monitor and display Node.js application data as a html web application.
Other
456 stars 55 forks source link

Adds option to pass middleware #149

Closed vajahath closed 6 years ago

vajahath commented 6 years ago

This PR enable users to pass a middleware along with options object.

If I want to protect the appmetrics dash, pass a middleware like:

const options = {
  ...
  middleware: (req, res, next)=>{
    // do stuff to protect
    return next()
  }
  ...
}

attach(options);
vajahath commented 6 years ago

let me close this and make a new one..

codecov-io commented 6 years ago

Codecov Report

Merging #149 into master will increase coverage by 1.64%. The diff coverage is 70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   63.17%   64.81%   +1.64%     
==========================================
  Files           4        4              
  Lines         410      415       +5     
==========================================
+ Hits          259      269      +10     
+ Misses        151      146       -5
Impacted Files Coverage Δ
lib/appmetrics-dash.js 61.66% <70%> (+2.68%) :arrow_up:
lib/classes/collections.js 64% <0%> (-2%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a8c44ee...289ac1a. Read the comment docs.