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

noojiapi.nooji.io

v0.0.1

Published

noojiapi.

Readme

################################################################################
###                                                                          ###
###   _   _                   _   _                          _   _           ###
###  | \ | |                 (_) (_)                        | | (_)          ###
###  |  \| |   ___     ___    _   _   _ __ ___     ___    __| |  _    __ _   ###
###  | . ` |  / _ \   / _ \  | | | | | '_ ` _ \   / _ \  / _` | | |  / _` |  ###
###  | |\  | | (_) | | (_) | | | | | | | | | | | |  __/ | (_| | | | | (_| |  ###
###  |_| \_|  \___/   \___/  | | |_| |_| |_| |_|  \___|  \__,_| |_|  \__,_|  ###
###                         _/ |                        Noojimedia (c) 2016  ###
###                        |__/                                              ###
################################################################################

Nooji API - NoojiMedia, Inc. 2016

NOTE: manual modifications to node_modules/loopback-api-testing/index.js

Allows for titles to be added to each test array (within each file)

the title must be the first element in the array

{"title": "This is the test title"}

Modifications needed:

on line 13

var testTitle = 'Loopback API';

line 27 (above the describe block)

if(conf[0].hasOwnProperty('title')){
  testTitle = conf[0].title;
  conf.shift();
}

describe(testTitle, function() {

Allows for descriptions to be added to the default loopback description

the description variable must be added to the json test block

{
  "description": "More clarification on test description",
  "method": "GET",
  ...
}

Modifications needed:

line 53 (where description is being instantiated)

var description = c.hasOwnProperty('description') ? c.description+'\n\t' : '';
description += 'should respond '+c.expect+' on '+authenticationDescription+' '+c.method+' requests to /'+c.model;

The project is generated by LoopBack.

TOC

Setup and installation

Pre-requirements

  • git and at least read permission for the repository
  • node install v6.8.0 or later
  • npm v3.10.8 or later

Installation

$ git clone [email protected]:gitnooji/nj-api.git

$ npm install

$ npm start

> [email protected] start /Users/adelonga/Desktop/nooji/nj-api
> node .

Web server listening at: http://0.0.0.0:3001
Browse your REST API at http://0.0.0.0:3001/explorer

Post installation tests

The command below is a simple test to make sure the test framework is operational

$ npm run test-mocha

Now run basic unit tests to make sure the api is responding properly

$ npm test

Deploying API to dev server

Run the API on port 3001 to view the explorer (use complete path to noojiservers.pem)

$ ssh -i "/Users/adelonga/Desktop/nooji/certs/aws_pem/noojiservers.pem" [email protected]

$ cd nj-api

$ git pull origin development

$ forever stopall

$ forever start server/server.js

congratulations you now have a working API at http://dev-api.nooji.io:3001/explorer/

Docker configuration and Setup

Build the docker image

From the root folder of the project.

$ docker build -t nj-api .

You should see similar output as below

Sending build context to Docker daemon 92.74 MB
Step 1 : FROM mhart/alpine-node:6
 ---> d9363f62a6ac
Step 2 : WORKDIR /src
 ---> Using cache
 ---> e2b103b82a95
Step 3 : COPY . .
 ---> Using cache
 ---> 7b47d6aa7f52
Step 4 : RUN npm install
 ---> Using cache
 ---> 3fe0b5f56dff
Step 5 : EXPOSE 3001
 ---> Using cache
 ---> 493099bc6a4b
Step 6 : CMD node server/server.js
 ---> Using cache
 ---> 8b83b43876a1
Successfully built 8b83b43876a1

you now have an image called nj-api

You are able to run this image using the following, replace the path to the certs mounted volume with the path to the certs folder. (use this when the ports defined in Dockerfile are available on your machine)

docker run -v /Users/adelonga/Desktop/nooji/certs/:/certs -P -t nj-api

If you wish to run the docker environment using your locally checked out version of the codebase (use this to remap the port/s, 3001, defined in Dockerfile to available ports on your machine, 3000)

docker run -v /Users/adelonga/Desktop/nooji/certs/:/certs -v $(pwd):/src -p3001:3000 -t nj-api

will run the server but overlay the current folder

Scripts

The following scripts are defined in package.json

Running

  • $ npm start (starts api server locally on port 3001)

Linting

  • $ npm run lint (apply lint rules)

Testing

  • $ npm run test-mocha (smoke test to make sure mocha is configured)
  • $ npm test (runs unit-tests then applies lint rules)