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

@loadmill/node-recorder

Package Overview
Dependencies
Maintainers
0
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loadmill/node-recorder

Loadmill expressjs recorder middleware

  • 0.3.141
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
88
decreased by-43.23%
Maintainers
0
Weekly downloads
 
Created
Source

Loadmill node-recorder

Users of Loadmill can use node-recorder middleware to capture traffic in their express.js apps. Later they can generate and replay the recording as API tests.

Setup Walkthrough

Go to Recordings App Setup and create a new application.
Copy Loadmill Tracking Id and use it as loadmillCode option value in expressRecorder.

Installation

Using npm:

npm i @loadmill/node-recorder --save

Using yarn:

yarn add @loadmill/node-recorder

API

Use expressRecorder middleware:

const { expressRecorder } = require('@loadmill/node-recorder');
const app = require('express')();
app.use(expressRecorder({ loadmillCode: process.env.LOADMILL_CODE }));

expressRecorder accepts options object - containing:

  • loadmillCode - (REQUIRED). can be retrieved after creating a new application for recording.
  • notSecure - (default = false). Optionally you can make recorded traffic not be hashed.
  • cookieExpiration - (default = 3 minutes = 3 * 60 * 1000). expressRecorder maintain cookie to define new recording session per uniqueId(user). More about split recording session.
  • basePath - (default = https://dummy.domain). Define the protocol://host of your app.

Extended Example

app.use(expressRecorder({ 
   loadmillCode: process.env.LOADMILL_CODE,
   notSecure: false, 
   cookieExpiration: 10 * 60 * 1000,
   basePath: 'https://loadmill.com'
}));

How do I debug?

Loadmill node-recorder uses the debug module internally, so you can set the DEBUG environment variable to loadmill:* to see all debugging, or select individual namespaces DEBUG=loadmill:node-recorder to constrain a bit.

Learn More

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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