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

comp-intel-monitoring-api

v1.0.1

Published

API supporting the Norstella Competitive Intelligence Monitoring Dashboards.

Downloads

4

Readme

CompIntel Monitoring API

API supporting the Norstella Competitive Intelligence Monitoring Dashboards.

Installation

Install NVM for managing node.js versions

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

Use the node version which is auto selected from the repo config

nvm use

Install dependencies

npm install

Install Podman (free docker alternative) for running the database

Install to your OS

podman machine init
podman machine start

Local development

Local development can be done my running the application locally with serverless-offline

npm run start

This will spin up a local web server on port 5002 which emulates the API Gateway and Lambda integration that would be deployed into AWS. This local API can be tested directly using a tool like curl or PostMan. It also can be used as the API for the CompIntel UI running locally by setting the environment of the UI to localOffline

Database Queries

This application uses an Aurora Postgres RDS instance as the App DB.

Locally this is emulated in both the tests and serverless offline using an container running locally. The schema is read from the SQL DDL found in the scripts folder on startup.

Run the following command to set up a fully populated db locally for testing:

npm run db

This application uses the Kysely SQL Query Builder to build and execute fully Type Safe database queries. The TypeScript types are generated automatically from the SQL DDL found in the scripts folder.

DB Type Generation

The DDL in the scripts folder is currently generated from the Dev RDS instance and can be updated using the DB GUI of your choice.

When the schema is updated the TypeScript types can be generated using the type generator. This is dependent on a locally running Postgres DB instance. This can be done using the podman container runner.

With podman installed you can run the following:

npm run db:generate

Then the types will be updated in the db/generated folder.