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

onerostermicroservice

v1.0.0

Published

## Running tests

Readme

oneroster

Running tests

There are three sets of tests in this project:

  1. Initial unit tests (very few).
  2. Legacy service integration tests for oneroster.
  3. Legacy service integration tests for gradecam.

Unit tests

Unit tests run with the jest framework. They require no additional, external dependencies.

$ npm test
$ npm run test.watch

Legacy service integration tests

NOTE: gradecam tests have not been verified as fixed yet.

Legacy service integration tests currently require a seeded local database backing the tests. This will be migrated to a clean docker-compose test environment in the future.

To setup the local DB test fixtures:

$ sed 's/apiedzoneserver_test/apiedzoneserver/' ../database/fixture/minimalDevDB.sql | mysql -h 127.0.0.1 -proot -uroot
$ cat test/seed.sql | mysql -h 127.0.0.1 -proot -uroot apiedzoneserver
$ cat test/minimalTestData.sql | mysql -h 127.0.0.1 -proot -uroot apiedzoneserver

Once setup, the test suite will attempt to clean up after itself on the same database instance.

Configure your mysql environment via .env file (see examples).

Test oneroster endpoints:

npm run test.oneroster

Docker Build

These were previosuly wrapped in a gulpfile, but are straight-forward commands:

docker build -t otus/oneroster .

Note that ONE_ROSTER_ENV may need to be set.

docker-compose setup

This service is part of the monolith docker-compose env set-up (this many change in the future)

Example:

`docker-compose build oneroster`
`docker compose up -d` will bring up all services (including oneroster) in socure-code/docker-compose.yml

oneroster will be available at PORT 9005 in the composed environment.

Configuration / Environment Variables

| Variable Name |Description | | --------------------------- |------------------------------------------------------------------- | | REDIS_HOST | Host for Redis Connection | | REDIS_PORT | Port for Redis Connection | | MYSQL_HOST | Host to run mysql locally | | MYSQL_USER | Local mysql user | | MYSQL_PASSWORD | Local mysql password | | GRADECAM_BASIC_AUTH | Gradecam auth | | GRADECAM_BASE_URL | Gradecam base url | | SERVER_URL | OneRoster server url | | FEED_SQS_URL | Local feed SQS url | | FEED_AWS_SQS_REGION | aws region | | FEED_AWS_KEY | Key to access feed SQS | | FEED_AWS_SECRET_ACCESS_KEY | OneRoster server url |

FORCED_PROTOCOL can be set to force 'http' or 'https' as the protocol of the url used to calculated a verify signed oauth 1.0 requests. If not set, assumes protocol from Request object.

This likely needs to be set with FORCED_PROTOCOL=https if behind a SSL terminating proxy.

Local Development

Create a .env file for yourself. Use .env.example as an example.

Deployed Environment

Environment variables are deployed as a sercrets configuration. See deployment.yml for more information