npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

datahub

v0.1.0

Published

The code behind <http://data.okfn.org>.

Downloads

4

Readme

The code behind http://data.okfn.org.

Core is an ultra-lightweight Data Hub running off data packages.

Implementation Notes

  • Very simple. Just one or two simple web pages

  • DataStore and API

    • May be optional for MVP?
    • SQL-backed (Use "SqlStore" stuff from CKAN?)
    • JSON RESTful API
    • Refine reconciliation support
    • Build on CKAN DataStore ...
  • Web interface

    • Big list on the front page
    • per-datasets page /{dataset-name}-{id}/...
    • Scrollable table of the data with search (?)
    • Links to download of CSV and full API instructions
    • (?) URL for each element /{dataset}/id/{element-id}/
    • Add .json, .{...} for each item

How to implement?

  • Pure JS (or Node or Flask?)

  • Why Not Use CKAN?

    • We may use CKAN at some point BUT to start with ...
    • Want very simple structure (just a few pages)
    • Preference for JS only (lots of browser JS)
    • Don't need CKAN's full power
    • CKAN somewhat more complex to deploy

Installing

Requires NodeJS (>= v0.8).

Install the requirements (in package.json):

npm install .

Run the web application locally:

node app.js

If you want to customize the catalog file you run off set the environment variable:

export CATALOG_URL={url-to-your-data-package-catalog}

Deployment to Heroku

Note that you will need to install the Heroku toolbelt to carry out the heroku commands below.

Create the application on Heroku

Skip this step if the application is already deployed

This is heavily based on this tutorial.

# replace {app-name} with the name of your app
heroku create {app-name}
git push heroku master
# now point at our config
heroku ps:scale web=1

To deploy (already created):

Push to heroku git repo:

git push heroku master

Note: if didn't do the create you will need to add the heroku remote:

git remote add heroku [email protected]:{app-name}.git

Adding collaborators:

heroku sharing:add [email protected]

Setting the domain name

Do the following:

heroku domains:add {your-domain-name}

Now CNAME your domain to {myapp}.herokuapp.com