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

@mercuryworkshop/wisp-js

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mercuryworkshop/wisp-js - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "@mercuryworkshop/wisp-js",
"version": "0.1.0",
"version": "0.1.1",
"description": "A client and server for the Wisp protocol, written in Javascript",

@@ -5,0 +5,0 @@ "repository": {

@@ -85,9 +85,30 @@ # JavaScript Wisp Client

### Example With Express:
```js
import { server as wisp } from "@mercuryworkshop/wisp-js/server";
import express from "express";
import morgan from "morgan";
const app = express();
const port = process.env.PORT || 5001;
app.use(morgan("combined"));
app.use(express.static("./"));
const server = app.listen(port, () => {
console.log("Listening on port: ", port)
});
server.on("upgrade", (request, socket, head) => {
wisp.routeRequest(request, socket, head);
});
```
### Change the Log Level:
By default, all info messages are shown. You can change this by importing `logging` from the module, and setting its `level` property to one of the available log levels:
- `logging.level = logging.DEBUG`
- `logging.level = logging.INFO` (default)
- `logging.level = logging.WARN`
- `logging.level = logging.ERROR`
- `logging.level = logging.NONE`
By default, all info messages are shown. You can change this by importing `logging` from the module, and calling `logging.set_level` to set it to one of the following values:
- `logging.DEBUG`
- `logging.INFO` (default)
- `logging.WARN`
- `logging.ERROR`
- `logging.NONE`

@@ -97,3 +118,3 @@ ```js

logging.level = logging.DEBUG;
logging.set_level(logging.DEBUG);
```

@@ -100,0 +121,0 @@

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