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

uquik

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uquik - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

4

package.json
{
"name": "uquik",
"version": "1.0.8",
"version": "1.0.9",
"description": "uQuik HTTP(S) framework",

@@ -12,3 +12,3 @@ "main": "index.js",

"test": "echo \"Error: no test specified\" && exit 1",
"wrk": "wrk -t4 -c2500 -d60s -R62000 http://127.0.0.1:5000",
"wrk": "wrk -t4 -c2500 -d60s http://127.0.0.1:5000",
"wrk-post": "wrk -s examples/post.lua -t4 -c2500 -d60s -R31000 http://127.0.0.1:5000"

@@ -15,0 +15,0 @@ },

@@ -63,3 +63,3 @@ const uWebSockets = require('uWebSockets.js')

this.handlers = new Map([
['on_not_found', null],
['on_not_found', (request, response) => response.status(404).send()],
['on_error', (request, response, error) => {

@@ -154,2 +154,6 @@ if (process.env.NODE_ENV === 'development') console.log(error)

listen (port, host = '127.0.0.1') {
// Adding not found handler (404)
this.any('/*', (request, response) => this.handlers.get('on_not_found')(request, response))
this.routes_locked = true
return new Promise((resolve, reject) =>

@@ -227,16 +231,3 @@ this.uws_instance.listen(host, port, (listenSocket) => {

// Store not_found handler and bind it as a catchall route
if (this.handlers.get('on_not_found') === null) {
this.handlers.set('on_not_found', handler)
return setTimeout(
(reference) => {
reference.any('/*', (request, response) => reference.handlers.get('on_not_found')(request, response))
reference.routes_locked = true
},
0,
this
)
}
// Do not allow user to re-register not found handler
throw new Error('A Not Found handler has already been registered.')
this.handlers.set('on_not_found', handler)
}

@@ -243,0 +234,0 @@

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