RafalWilinski/express-status-monitor

Make chartjs and socket.io not to pull from cdn?

bwgjoseph opened this issue · 2 comments

Hi,

I'm using this in offline environment and it doesn't work because it seem that the scripts are pulling from cdn

<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.2/Chart.bundle.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js"></script>

I manually download the files are cdn, place it in my /public to host it instead then point to my host and it does work.. Any idea if the js files can be placed within the /javavscripts directory? So that it can reference local js file rather than cdn?

I am also facing issue where it complains about event-loop-stats not found, ignoring event loop metrics... I'm using node v12

flogy commented

Would also be interested in this.

I am also facing issue where it complains about event-loop-stats not found, ignoring event loop metrics... I'm using node v12

@bwgjoseph, You are missing the optional event-loop-stats module.
It should come installed when you do npm install express-status-monitor.

"optionalDependencies": {
"event-loop-stats": "1.2.0"
},

It complaints via a warn (not an error) as it is optional. You can do npm install event-loop-stats to get rid of it.


It's optional because the code handles it.

try {
eventLoopStats = require('event-loop-stats'); // eslint-disable-line
} catch (error) {
console.warn('event-loop-stats not found, ignoring event loop metrics...');
}

if (eventLoopStats) {
stat.loop = eventLoopStats.sense();
}