Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
Conforms to JSON RPC 2.0 Specification (http://www.jsonrpc.org/specification)
Server
// create express server the normal way
var express = require( 'express' );
var app = express();
// setup fling instance before you start the web service
var fling = require( 'fling' );
var transport = new fling.transports.receivers.Express( {
express: app,
url: '/rpc'
} );
var receiver = new fling.Receiver( {
baseDir: __dirname + '/lib/publicRpc' // this takes an absolute path
} );
receiver.addTransport( transport );
// start the web service
app.listen( 8080 );
Server RPC Module: /lib/publicRpc/a/path/to/a/node/module.js
module.exports.action = function( request, done ) {
done( 200, {
some: 'response',
for: [ 'you' ]
} );
};
Client
var request = require( 'request' );
request( {
url: 'http://somehost:8080/rpc',
json: {
jsonrpc: '2.0',
id: 100,
method: 'a.path.to.a.node.module.action',
params: {
your: 'params',
here: []
}
},
method: 'POST'
},
function( err, response, body ) {
console.log( body );
// outputs
// {
// jsonrpc: '2.0',
// id: 100,
// result: {
// some: 'response',
// for: [ 'you' ]
// }
// }
} );
More receiver transports: TCP Socket, in-process, and more Client transports to make an RPC call into a fling server
FAQs
JSON Fling is a simple JSON-RPC framework for NodeJS with built-in permissions and support for different transports.
The npm package fling receives a total of 12 weekly downloads. As such, fling popularity was classified as not popular.
We found that fling 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.