Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-status-monitor

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-status-monitor - npm Package Compare versions

Comparing version 0.0.4 to 0.0.6

15

index.js
(function () {
'use strict';
const fs = require('fs');
const path = require('path');

@@ -66,3 +67,3 @@ const os = require('os');

const middlewareWrapper = (config) => {
if (config === null || config === {} || config === undefined) {
if (config === null || config === undefined) {
config = defaultConfig;

@@ -85,2 +86,12 @@ }

fs.readFile(path.join(__dirname, 'index.html'), 'utf8', (err,data) => {
if (err) throw new Error(err);
var result = data.replace(/{{port}}/g, config.socketPort);
fs.writeFile(path.join(__dirname, 'index.rendered.html'), result, 'utf8', (err) => {
if (err) throw new Error(err);
});
});
io.on('connection', (socket) => {

@@ -101,3 +112,3 @@ socket.emit('start', config.spans);

if (req.path === config.path) {
res.sendFile(path.join(__dirname + '/index.html'));
res.sendFile(path.join(__dirname + '/index.rendered.html'));
} else {

@@ -104,0 +115,0 @@ onHeaders(res, () => {

2

package.json
{
"name": "express-status-monitor",
"version": "0.0.4",
"version": "0.0.6",
"description": "Monitoring for Express-based Node applications",

@@ -5,0 +5,0 @@ "main": "app.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc