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

stubs-express-middleware

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stubs-express-middleware - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

6

lib/middleware.js

@@ -28,3 +28,3 @@ const express = require('express')

const stubPath = getStubPath(req, key)
const testApi = `${origin}/stub/test/${encodeURIComponent(stubPath)}`
const testApi = `${origin}/api/${stubPath}`
http.get(testApi, res => {

@@ -40,7 +40,7 @@ if (res.statusCode !== 200) {

res.on('end', () => {
console.log(`stubs: ${stubPath} is enabled`)
console.log(`✅ Stub found => ${stubPath}`)
resolve(true)
})
}).on('error', () => {
console.log(`stubs: ${stubPath} is not enabled, skip proxy`)
console.log(`❌️ Stub NOT found or disabled, call real api => ${stubPath}`)
reject()

@@ -47,0 +47,0 @@ })

{
"name": "stubs-express-middleware",
"version": "0.0.6",
"version": "0.0.7",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/middleware.js",

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