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

datapile

v0.3.0

Published

A mock backend for your Native Web applications to provide JSON results and allow simple CRUD operations.

Downloads

23

Readme

Data Pile Server

A simple backend server to help build Single Page Applications (Native Web) by providing a simple CRUD database that is easily reset to an original state on startup. The server allows you to build customized responses to all CRUD operations but will assume operations you may not have thought of or care about.

Setup

To install via NPM run:

npm install datapile

By default the server will look to a folder called "mock-data". Create this folder much the same as it's build out in the "mock-data" folder in this project.

A recommended way to start the server is to add a script item in your package.json:

  "mockserver": "datapile"

CLI

You can send in the same items into the command line (or in the scripts section of your package.json):

datapile --port 3001 --host 0.0.0.0 --dataFolder "mock-data" --delay -1

Arguments

| Argument | Role | Default | | ------------- | ------------- | ------------- | | port | The port to run on | 3001 | | host | The host to serve on | "localhost" | | dataFolder | The folder to serve up | "./mock-data" | | delay | The ms delay to introduce to the responses. -1 = random (0-1000) | 0 | | ignoreQuery | Ignore any query parameters in this comma delimited list | |

Usage

In the mock-data folder you create, you will need to create a .json file for all interactions you will have with the data. The server attaches _GET.json, _POST.json, _PUT.json, _DELETE.json to the end of the requested urls.

The items in the mock-data folder part of this project are a working example.

Proxy Server

To closer imitate a proxy server, this server also checks for a header called "original-url" and uses that if present. This allows you to always hit the same endpoint (say /service*) and send original url to more closely mimic a proxy server (like netflix Zuul).

Admin

If you hit the root of the server that is running, you will see the admin screen. Currently it's a work in progress, but it does allow you to alter the responses of the server at any given moment. This is handy when you want to test authentication or server errors.

Features

There is a mock-data folder with the server. Here you will see a couple examples already built for you. To build out the server responses you simply need to create the array responses.

Ignoring Query Parameters

Some applications require ignoring some query string parameters, namely a cache bust style query parameter. To ignore parameters simply add the --ignoreQuery flag with a comma delimited list of query parameters to ignore:

--ignoreQuery v,index

TODO

There's a ton of untested portions of this application, use at your own peril. It's definitely not meant to be a production server. If something doesn't work for you, feel free to dive in and make a PR. Otherwise it's MIT so grab this thing and go crazy with it! This is honestly my first attempt at an NPM dependency.

  • More dynamic JSON loading and assumptions
  • Allow the database to be altered
  • Quickly reset the database to an initial state
  • Better CLI error handling
  • Allow the admin page to set the response code