
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
shariff-backend-node
Advanced tools
Shariff is used to determine how often a page is shared in social media, but without generating requests from the displaying page to the social sites.
Shariff is used to determine how often a page is shared in social media, but without generating requests from the displaying page to the social sites.
This document describes the Node backend. The following backends are also available:
The frontend is available here:
Create a project folder and install the Shariff server using npm
:
$ mkdir my-shariff-server
$ cd my-shariff-server
$ npm init
$ npm install --save shariff-backend-node
The node package contains a configuration file shariff.json
. The following configuration options are available:
Key | Type | Description |
---|---|---|
port | integer | Port Shariff runs on |
host | string | Host/IP address Shariff runs on |
cache | object | Cache settings described below |
Cache settings:
Key | Type | Description |
---|---|---|
engine | string | catbox backend |
expiresIn | integer | Cache duration in milliseconds |
Start Shariff with:
$ node node_modules/shariff-backend-node/run.js
141104/143603.929, info, Server ist running at: http://localhost:3001
Alternatively, you may call the Shariff backend from your own code. If called directly, the code will still use a cache and honor the expiresIn setting, the engine will however not be used in this case, just a simple object store.
Sample:
var Shariff = require('shariff-backend-node');
Shariff.getCounts('google.com').then(function(counts) {
console.log('Success, counts:', counts);
}, function(err) {
console.log('Failed to grab counts!', err);
});
If passed true
as second parameter, the getCounts()
method will not use its cache and instead re-query the services.
Visit http://localhost:3001/?url=www.example.com
to get a JSON structure containing the share counts:
{"facebook":1452,"googleplus":23}
FAQs
Shariff is used to determine how often a page is shared in social media, but without generating requests from the displaying page to the social sites.
The npm package shariff-backend-node receives a total of 0 weekly downloads. As such, shariff-backend-node popularity was classified as not popular.
We found that shariff-backend-node 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.