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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@y5systems/lightjs

v0.1.1

Published

A lightweight Node.js framework designed to simplify the creation of efficient applications.

Readme

LightJS

License

A lightweight Node.js framework designed to simplify the creation of streamlined and efficient applications.

Features

  • Minimalistic and Intuitive: Get started quickly.
  • Focused on Simplicity: Ideal for small to medium-sized projects that prioritize efficiency.
  • Built for Microservices: Easily create independent services for scalable applications.

Installation

npm install @y5systems/lightjs

Getting Started

This framework uses RabbitMQ for communication between services. Make sure to have it up and running before you run your application.

Create a Project:

mkdir my-app && cd my-app
npm init -y

Note: This documentation uses TypeScript, make sure to install it and to add a tsconfig.json file.

Install the Framework:

npm install -s @y5systems/lightjs

Create your main file (e.g. index.ts):

import startApplication from '@y5systems/lightjs';

const appRootPath = dirname(fileURLToPath(import.meta.url));
startApplication(appRootPath).then();

Create a service to produce messages (e.g. producer.ts):

mkdir -p services/producer
import {MessageBroker, Service} from '@y5systems/lightjs';

export default class Producer extends Service {

  constructor(messageBroker: MessageBroker, serviceConfiguration: Record<string, unknown>) {
    super(messageBroker, serviceConfiguration);
  }

  async run(): Promise<void> {
    const interval = setInterval(() => {
      this.sendMessage('consumer', 'messageLogger', {message: 'producing...'});
    }, 1000);
  }
}

Create a service to consume messages (e.g. consumer.ts):

mkdir -p services/consumer
import {MessageBroker, Service} from '@y5systems/lightjs';

export default class Consumer extends Service {

  constructor(messageBroker: MessageBroker, serviceConfiguration: Record<string, unknown>) {
    super(messageBroker, serviceConfiguration);
  }

  async run(): Promise<void> {
    this.messageBroker.messageConsumers.set('messageLogger', new MessageLogger(this.messageBroker.eventEmitter));
  }
}
import {EventEmitter} from 'node:events';

import {MessageConsumer} from '@y5systems/lightjs';

class MessageLogger extends MessageConsumer {
  constructor(eventEmitter: EventEmitter) {
    super(eventEmitter);
  }

  async consume(data: Record<string, unknown>): Promise<void> {
    console.log(data.message);
  }
}

Create the configuration file (e.g. development.json):

mkdir config
[
  {
    "service": "producer",
    "name": "producer-01",
    "serviceConfiguration": {}
  },
  {
    "service": "consumer",
    "name": "consumer-01",
    "serviceConfiguration": {}
  }
]

Setup your environment:

NODE_ENV=development
SERVICES=

RABBITMQ_HOSTNAME=127.0.0.1
RABBITMQ_PORT=5672
RABBITMQ_USERNAME=rabbitmq-username
RABBITMQ_PASSWORD=rabbitmq-password
RABBITMQ_VHOST=rabbitmq-vhost

Note: You can choose what services to run using the SERVICES variable (An empty string will run all services on the configuration file).

Run the application:

node --env-file=.env index.js

License

This project is licensed under the MIT License - see the LICENSE file for details.