Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
expressify-ipc
Advanced tools
An Expressify strategy enabling RESTful application over a local socket transport.
An Expressify strategy enabling RESTful application over a local socket transport.
Current version: 1.0.4
Lead Maintainer: Halim Qarroum
npm install --save expressify-ipc
In order to use expressify-ipc
, you need to create an instance of the strategy and pass it to an expressify client or server. You must pass to the constructor of expressify-ipc
an options object containing two parameters :
The below example shows you how to create an instance of an Expressify client using the ipc
strategy.
// Creating the `client` instance.
const client = new Expressify.Client({
strategy: new IpcStrategy({
endpoint: 'expressify.server',
namespace: 'foo'
})
});
The below example shows you how to create an instance of an Expressify server using the ipc
strategy.
// Creating the `server` instance.
const server = new Expressify.Server({
strategy: new IpcStrategy({
endpoint: 'expressify.server',
namespace: 'foo'
})
});
// Listening for incoming requests.
server.listen().then(() => {
console.log(`[+] The server is listening on namespace '${server.strategy.opts.topic}' !`);
});
expressify-ipc
Since the expressify-ipc
module uses IPC local socket communication, it is required to make sure that, when done using the server or the client, you properly release the resources that have been allocated to them.
Here, you simply have to call the .close()
API on the server instance as you would usually do it with any expressify strategy. THis will close the local socket on which the strategy is communicating.
server.close().then(() => console.log('Server instance closed'));
When done with a client instance, you need to explicitely close it using the .close()
API on the client instance.
client.close().then(() => console.log('Client instance closed'));
If you do not close the client on Node.js, the event loop will continue running since the local socket associated with the strategy which the client is using is still opened.
See how the client is properly closed in the examples associated with the expressify-ipc
strategy.
Two functional examples involving the expressify-ipc
strategy are available in the examples directory :
expressify-ipc
to expose a REST interface on the server which can store in memory a set of key-value pairs, and on the client on how to query this service remotely over local sockets.expressify-ipc
to expose system metrics on the server and to display them to the user on the client..postMessage
.FAQs
An Expressify strategy enabling RESTful application over a local socket transport.
The npm package expressify-ipc receives a total of 5 weekly downloads. As such, expressify-ipc popularity was classified as not popular.
We found that expressify-ipc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.