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

events-analytics

v1.0.0

Published

Event-Analytics

Downloads

1

Readme

ArborKnot Client API

ArborKnot Event API, see legacy RCG API.

Getting Started

Install:

Open a terminal and run:

[email protected]:Arborknot/Event-Analytics.git
cd Event-Analytics 
cp .env.example .env
nvm use # or enable auto switch https://github.com/nvm-sh/nvm#automatically-call-nvm-use
npm install
npm run start:db # if you use local db
npm run start:watch

Running tests

npm run start:db
npm run test # will use postgresql://postgres@localhost:5440/postgres
# or use IDE, e.g. vscode has https://marketplace.visualstudio.com/items?itemName=firsttris.vscode-jest-runner

Scripts

  • npm run test: run all tests once
  • npm run build: build project once
  • npm run build:watch: build project when a change is detected
  • npm run start: build and run server
  • npm run start:db: start local databse
  • npm run start:nodemon: restart server when a change is detected
  • npm run start:watch: build and restart server when a change is detected
  • npm run build && npm start: build and restart server when a change is detected

Environment Variables

The following table contains full list of used environment variables:

| Var | Description | Default | Example | | ----------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------- | ------------- | | LOG_LEVEL | Logging level, can be: error, warn, info, http, verbose, debug or silly | info | See default | | PORT | Server port | 4000 | See default | | DB_HOST | DB's host | localhost | See default | | DB_PORT | DB's port | 5432 | See default | | DB_NAME | DB's name | postgres | See default | | DB_USER | DB's user | postgres | See default | | DB_PASS | DB's password | postgres | See default | | DB_MIN_CONNECTIONS_ALLOWED | DB's min connections in pool | node-postgres defaults | 1 | | DB_MAX_CONNECTIONS_ALLOWED | DB's max connections in pool | postgres | 10 | | DB_IDLE_IN_TRANSACTION_SESSION_TIMEOUT_MILLIS | DB's number of milliseconds before terminating any session with an open idle transaction | no timeout | 1000 | | DB_CONNECTION_TIMEOUT_MILLIS | DB's number of milliseconds to wait for connection | no timeout | 1000 | | DB_IDLE_TIMEOUT_MILLIS | DB's number of milliseconds to wait for idle clients | 1000 | See default |

| SENDGRID_API_KEY | SendGrid API key | None | SG.XHs10LLSFu_5CS3EiZQ7Q.4GRFquO7kvPoy08C8ylcUhxkhY7TyrZyh6L50MH-Pu2 | | TWILIO_ACCOUNT_SID | Twilio accound SID | _None | ACdb3d110bcc827e8ddccd4bd3000a0487 | | TWILIO_ACCOUNT_TOKEN | Twilio account token | None | 4e63637d20d0e2178d9971ff16a383d4 | | TWILIO_MESSAGING_SERVICE_SID | Twilio messaging service sid | None | MGb627696lazad1ecfec5e9d4b59e59c92 |

Note: .env.example can be used as a reference too.

redis : docker run -p 6379:6379 redis you need to run redis and ioredis : version: '3'

services: redis: image: 'bitnami/redis:latest' environment: - ALLOW_EMPTY_PASSWORD=yes ports: - '6379:6379'

networks:

- app-tier

redis-sentinel: image: 'bitnami/redis-sentinel:latest' environment: - REDIS_MASTER_HOST=localhost - REDIS_PASSWORD=password - REDIS_MASTER_PASSWORD=password ports: - '26379:26379'

networks:

- app-tier

redis-commander: container_name: redis-commander hostname: redis-commander image: rediscommander/redis-commander:latest restart: always environment: - REDIS_HOSTS=localhost:6379 - REDIS_PASSWORD=password ports: - "8081:8081"

networks:

- app-tier

unit test: Create unit test with typescript : https://www.npmjs.com/package/ts-jest

db connection : Db connection : https://app.gitbook.com/o/-MSX5vtAAOdF7S4zifFt/s/-Mgl2Fw86qmgFeKwzqhS/devops/manuals/db-connections#staging