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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@korenezri/jsondb

v8.1.0

Published

![](https://img.shields.io/badge/jsonDB-By%20Koren-brightgreen)

Readme

JsonDB - a locally hosted, easy-to-use npm-packed database :D

Purpose

Basically, it's a very easy-to-use database you can install and run on your local host along with another server(s). Examples, explanations etc as follows:

(A note for Cyber4s students: Please view the bottom part to see how to best use this as a DB for your tasks)

Installation

  1. In your terminal, just run npm i @korenezri/jsondb . This will set you up with the latest version.

pic_one

Usage

This database offers various endpoints for CRUD operations on JSON files - specific endpoints will be specified in the bottom of this document.

To use, go to your project's main package.json file, and in the "scripts" object, add the following lines:

"database": "node node_modules/@korenezri/jsondb/server.js"

pic_two

Now to activate the server, make sure PORT 3001 is free and type in the terminal: npm run database (or whichever name you picked for it)

NOTE: "database" is just the name I picked - you can do anything you like.

Running this database-server along with another locally-hosted node.js server (or more!):

  • Install the NPM package "Concurrently" by typing npm i concurrently

  • In your project's main package.json file, add the following code to the "scripts" section:

  • "database": "node node_modules/@korenezri/jsondb/server.js" - This is the jsonDB databse

  • "main": "node index.js" - Your own node.js server you're trying to run

  • "start": "concurrently \ "npm run main" \ "npm run database"" - Set up the 'concurrently' package (NO SPACES BETWEEN \ and " - this is just Github's formatting.

pic_three

To run, just type npm start in the terminal:

gif_one

Available end-points

Each JSON file created will have a different unique ID via the uuid npm package. JSON files are structured as follows when first created:

{ "record": [

] }

  • View all JSON files: a GET request to /all (this gives you an array of file names!)
  • View specific JSON file (if it exists): a GET request to /b/:id (this gives you the actual file contents)
  • Create a JSON file: a POST request to /
  • Update a JSON file by ID: a PUT request to /b/:id
  • Delete a JSON file by ID: a DELETE request to /b/:id

Using as a database - "default.json and users.json"

Basically, the package comes with two default bins that you can update regularly, their IDs respectively are "default" and "users" (unlike any other new bin you create which will be given a random uuid id). You should only use those two as your database as they will always be there when you install the package and you won't need to change your code . Remember - running npmi on a new computer will download the package anew, and will not have all the other bins your created - just two empty default bins - "default" and "users".

Dependencies

  • body-parser: 1.19.0
  • cors: 2.8.5
  • express: 4.17.1
  • moment: 2.29.1
  • uuid: 8.3.2

Author: Koren Ben Ezri