This project implements a simple publish-subscribe (PubSub) system for managing machine events such as sales, refills, low stock warnings, and stock OK notifications.
- PubSub Service: A singleton service to manage event subscriptions and publications.
- Machine Repository: A repository to manage machine data.
- Event Handling: Custom events for machine sales, refills, low stock warnings, and stock OK notifications.
- Subscribers: Subscribers to handle different types of events.
- JSDocs doccumentation: Documentation for the project. (Written with the help from Github Copilot)
-
Clone the repository:
git clone https://github.com/C0NS03L/simple-pubsub.git cd simple-pubsub
-
Install dependencies:
bun install
-
Run the main program:
bun start
-
Run tests:
bun test