Skip to content
A java backend for Shariff.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.editorconfig
.gitignore
.travis.yml
LICENSE.txt
Procfile
README.md
app.json
pom.xml

README.md

OBSOLETE

OBSOLETE this repo has not been maintained in a while. Please try https://github.com/shred/shariff-backend-java as an alternative

shariff-backend-java Build Status

A java backend for https://github.com/heiseonline/shariff

Deploy

Deploy

To use your own server, simply build the app (mvn package) and deploy the resulting war to your favourite application server.

Test locally

mvn tomcat7:run

Should result in 'Running war on http://localhost:8080'

Open http://localhost:8080/?url=www.example.com to receive

{"reddit":25,"facebook":474517,"twitter":10237,"linkedin":0,"delicious":0,"stumbleupon":5882,"pinterest":1,"google-plus":28387}

Configuration

see Config Class

Configure the proxy via environment variables:

# here you should provide a way to contact you. this information will be sent with the 
# user-agent header
SHARECOUNT_PROXY_MAINTAINER=my.domain.com
# restrict for which domains one can request the sharecounts for
# a semicolon delimited list of domains, regular expressions are possible
SHARECOUNT_PROXY_DOMAINLIST=.*
# sharecount uses cache2k, these are the things you can configure
SHARECOUNT_CACHE_SIZE=1000
SHARECOUNT_CACHE_EXPIRY_MS=300000

Roadmap

  • restrict length of parameter

suggestions and feedback welcome

You can’t perform that action at this time.