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

steelpenny

v8.0.4

Published

node api for COINS

Downloads

17

Readme

Steelpenny

nodejs based API for COINS


Basic Install

  1. Install the package: (global install)
  • npm i -g steelpenny
  1. Configure your environment according to the REQUIREMENTS.md doc
  2. Run the API server:
  • /usr/bin/steelpenny
  • Make sure your user is the same owner as the logs or has group write permission.

Basic Development Install

  1. Configure your environment according to the REQUIREMENTS.md doc
  2. Install the dependencies:
$ cd /coins/quarterback/packages/steelpenny
$ npm i

If you are a COINS developer, use: sudo -H -u ansible npm i

  1. Run the API:
$ node lib/index.js

Note: Current working directory should be: /coins/quarterback/packages/steelpenny


COINS Internal Usage

  • To start the server as a daemon, ansible-provisioned servers should have startup method:
sudo service steelpenny start
  • To enable monit monitoring:
sudo monit monitor steelpenny

Design Specifications

Code

Please refer to CONTRIBUTING.md for details about the code structure, and how to add to it.

Response Format

All responses are a JSON string which parses to an object of the following format:

{
  data: [ ... ],
  error: null | {},
  stats: {will eventually include performance data}
}

It is worth noting that the data property will always be an array, even if only a single value is requested/retrieved.

The error property will be null if no errors have occurred. If an error did occur, then the error object will take the following form:

{
  error: '...',
  message: '...',
  statusCode: ###,
  debugData: {custom debug data}
}

Endpoints

Base URL

All endpoints have a prefix of /api/v#.#.# where v#.#.# is the version in package.json. The one exception to the above rule is GET /api/version, which can be used to retrieve the version via the API itself.

Protocol

By default, this server starts accepting HTTP connections on port 8080. To use HTTPS, place a reverse proxy server in front of this service. production and staging environments should listen for HTTPS connections on port 443, while development systems should listen on port 8443.

Other Endpoints

Please refer to the swagger documentation that is auto-generated by this repo. To view it, start this server npm start, and navigate to the base url + /swagger/documentation (e.g. https://coins-api.mrn.org/swagger/documentation).

Troubleshooting

If things aren't working, go down this quick checklist.

  • [ ] Is a redis server installed and running locally?

  • [ ] Is nginx installed, configured and running locally?

If you miss any of these requirements, remove all node modules and reinstall them after installing the requirements.