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

generic_rest_server

v0.5.7

Published

Will take any RESTFUL operations with no authentication required

Downloads

46

Readme

Generic Rest Server

An instant deployable REST and Socket server with authorization and hooks available
> npm install -g generic_rest_server
> generic-rest-server
> curl --data "afield=helloworld" http://localhost:1828/sample_collection
> curl http://localhost:1828/sample_collection

This is a generic REST server that will give and take any information thrown at it. I've built this for prototyping apps, although if security isn't a major concern, then I can't see a reason not to use it on simple production sites [ie. a personal blog]. The server runs on Node and the data is stored in MongoDB. Everything can be configured using a config file (Including function hooks) you pass as the only parameter to the executable. See the config.js in source for what can be set, and the format for setting collections and groups.

> generic-rest-server ~/myconfig.js

The urls are all "/:collection" with the data determining what to create, change or query. In the case of a "PUT" edit, the _id will be used to edit it.

The server supports both authorization and file upload/download.

You can add files by "PUT"ing to "/__file/:folder" and returned will be the object: {url: , type: }

Todo: an explanation of the configs and how to set authorization in configs in this README Also, I think you need to install mongoDB before this well work... I should look into how to have this app install mongoDB for the user.