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 🙏

© 2026 – Pkg Stats / Ryan Hefner

json2rest

v0.0.1

Published

Putting JSON files to REST

Readme

json2rest

Little node.js tool that reads local JSON files and POSTs them to a RESTful interface.

The main usage is in combination with DrowsyDromedary and aims to provide a easy way to upload large JSON arrays from files into a MongoDB collection.

Please note that the original DrowsyDromedary was written by Matt Zukowski and can be found here: https://github.com/zuk/DrowsyDromedary

Copyright and license

This software is available under the GPL v2.0 license (see license file in this repo for details)

Copyright (C) 2015 Armin Krauss

Installation

git clone https://github.com/educoder/json2rest.git
cd json2rest
npm install

Usage

Against a server using HTTPS

cd json2rest
node app.js pathtodrowsy/databasename/collection path/to/data.json drowsy.url.at.yourdomain.com 443 user:password

Against a local drowsy instance

cd json2rest
node app.js hampshire-apps/testing path/to/data.json localhost 9292

Please note that the first two parameters are required and the last three are optional (no auth, localhost, 8000).

Parameter breakdown

  1. The path part of the URL not the domain (On DrowsyDromedary this is usually database/collection or path/to/drowsy/database/collection)
  2. path to and name of json file to read the data from (must be an Array)
  3. domain part of the URL (could be anything with subdomains and such like drowsy.yourdomain.com or just yourdomain.com if that is serving Drowsy or Drowsy is under that domain but a certain path. Your choice here)
  4. Port (should be 443 since there is no reason to take to a REST interface without SSL, especially considering that BasicAuth without SSL is 100% insecure)
  5. BasicAuth username and password (highly recommend to activate BasicAuth on your Drowsy instance or the world is your guest)