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 🙏

© 2026 – Pkg Stats / Ryan Hefner

albe

v1.0.0

Published

<h1 style="text-align: center;">Albe.js</h1>

Readme

Database Connection:

Albe.js utilizes prisma as its default ORM, its shipped as an external plugin so you can replace it as per your own needs however to be able to use prisma you should first create a user in your database with proper permissions.

For local development you want to create a user with the following permissions according to prisma's documentation:

| Database | Database user requirements | |:--------------------:|---------------------------------------------------------------------------------------------------------------| | SQLite | No special requirements. | | MySQL | Database user must have CREATE, ALTER, DROP, REFERENCES ON . privileges | | PostgreSQL | The user must be a super user or have CREATEDB privilege. See CREATE ROLE (PostgreSQL official documentation) | | Microsoft SQL Server | The user must be a site admin or have the SERVER securable. See the official documentation. |

e.g. for a mysql database.

CREATE USER 'example'@'localhost' IDENTIFIED BY 'expassword';
GRANT CREATE, ALTER, DROP, REFERENCES ON *.* TO 'example'@'localhost';
FLUSH PRIVILEGES;

Warning This should only be done in local dev environments, as the leakage of the username and password with said privileges poses a high risk threat to the entire database.

If you are using a cloud hosted provider or if you need more information you can find it in prisma's documentation here.

In the root of the project you will find a .env.example file with the following content:

PORT=3000
HOST=0.0.0.0
#PUBLIC_URL=
DATABASE_URL="mysql://example:expassword@localhost:3306/exampledb"

Go ahead and make a copy with the name .env.

Right now we will only talk about the database url, this is the most important piece of information as it's what allows Albe to the database.

It consists of the protocol (in this case 'mysql') then the username (in this case 'example') then a colon ':' followed by the password of that user(in this case 'expassword') then an at symbol '@' followed by the host(in this case 'localhost') then another colon ':' this time followed by the port through which connection should be established (in this case 3306) and lastly a slash '/' followed by the database name.

It's important to note that prisma requires an existing database, so in case you haven't created it you should go ahead and create one and grant all permissions on it to the user you will be using for connections.

You will also find a folder called prisma which contains a file called schema.prisma with the following information:

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

This file contain all of the information about the database, from the connection information to the construction of the tables, and this will be what you will use to make any change to it.

Warning Only replace the client if you know what you're doing!

You can modify both the client and the db sections, for example to use a different database like postgresql.

This file can be either manually modified or you can generate it with the following command:

npx prisma init -y --datasource-provider 'sqlite'

You just have to replace sqlite with the desired provider, available providers are postgresql, mysql, sqlite, sqlserver, mongodb, cockroachdb;

** Changing the datasource provider probably means you will have to replace the connection url in the .env file as every protocol has its own peculiarities. **

You can find more information about it here.