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

@ladjs/api

Package Overview
Dependencies
Maintainers
3
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ladjs/api - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

17

index.js

@@ -28,2 +28,9 @@ const http = require('http');

let max = process.env.RATELIMIT_MAX
? parseInt(process.env.RATELIMIT_MAX, 10)
: 100;
if (!process.env.RATELIMIT_MAX && process.env.NODE_ENV === 'development')
max = Number.MAX_VALUE;
class Server {

@@ -51,7 +58,11 @@ constructor(config) {

rateLimit: {
duration: 60000,
max: process.env.RATELIMIT_MAX || 100,
duration: process.env.RATELIMIT_DURATION
? parseInt(process.env.RATELIMIT_DURATION, 10)
: 60000,
max,
id: ctx => ctx.ip
},
timeoutMs: process.env.API_TIMEOUT_MS || 2000
timeoutMs: process.env.API_TIMEOUT_MS
? parseInt(process.env.API_TIMEOUT_MS, 10)
: 2000
},

@@ -58,0 +69,0 @@ config

2

package.json
{
"name": "@ladjs/api",
"description": "API server for Lad",
"version": "0.0.8",
"version": "0.0.9",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",

@@ -6,0 +6,0 @@ "ava": {

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