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

@persistr/server

v4.5.9

Published

Persistr Server

Downloads

2

Readme

Persistr Server

Event-driven data store, used for building applications that follow Event-Driven Design (EDD), Event-Driven Architectures (EDA), or event sourcing.

Persistr Server has an event-driven push model where it notifies applications of any changes made in the data store. Data in the store is saved as change events organized into event streams.

Prerequisites

Node.js and NPM

Persistr Server is built using Node.js. It has been tested with Node.js v14 and NPM 7. Make sure that you have both installed before installing Persistr Server.

The easiest way to install Node.js is to install Node.js via package manager for your platform. NPM should come bundled with Node.js but if for some reason it doesn't, you can review NPM install instructions here.

MySQL

You must have a MySQL server already installed and an appropriate account created for Persistr Server to use. On first-run, you will be prompted to enter in your MySQL connection string. Persistr Server will create a database called "persistr" and will also create all the needed database tables. You just need to make sure that you have an appropriate MySQL user account for Persistr Server to use and provide the MySQL connection string when prompted.

Install

Install the server using npm

npm install -g @persistr/server

Run the server. It will detect that it is running for the first time and will prompt you for configuration settings.

$ persistr-server
✔ Configure? … yes
✔ Port? … 3010
✔ Root username? … root
✔ Root password? … 
✔ Log folder? … /Users/me/.persistr-server/logs/
✔ MySQL connection string? … mysql://root@localhost:3306/persistr
✔ Wrote configuration to /Users/me/.persistr-server/config.yaml
✔ Created MySQL 'persistr' database and tables
✔ Created root account
✔ Create demo account & database? … yes
✔ Created demo account & database

Persistr Server v4.5.7
Running on port 3010

Configuration settings that you will be prompted for:

  • Port: TCP port number that the server will listen to.
  • Root username and password: There is only one root user. Root user has ability to manage the server configuration and user accounts. Choose a secure username and password.
  • Log folder: Server error logs will be stored in this folder. Default is ~/.persistr-server/logs
  • MySQL connection string: Backing database is MySQL. Enter your MySQL connection string here. Note that the connection string must specify persistr as the initial database or it will be rejected.
  • Demo account: If you say yes then a demo user will be created with demo username and demo password. Persistr examples are designed to run out of the box with the demo account. If you're installing the server for development, it's recommended to create the demo account. If you're using the server for production then either don't create the demo account or deactivate/delete the demo account.

Configuration file is saved to ~/.persistr-server/config.yaml

CLI

There is a command-line interface for Persistr Server that can be used to manage the server and event streams. Read on for CLI install instructions.

Client Libraries

Official Javascript client library is available. It can be used client-side in all modern browsers and server-side with Node.js.

Examples

An official collection of example code is available here. All examples run out-of-the-box with a default install of Persistr Server on a local machine.

License

See the LICENSE file for license rights and limitations (MIT).