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

pockethost

v1.7.0

Published

PocketHost is the open source multi-tenant PocketBase server. PocketHost can run dozens, hundreds, even thousands of PocketBase instances on a single server or across a global cloud.

Downloads

81

Readme

PocketHost

PocketHost is the open source multi-tenant PocketBase server. PocketHost can run dozens, hundreds, even thousands of PocketBase instances on a single server or across a global cloud.

Extend PocketHost with its Plugin ecosystem. Start with the bare-bones dev server and add plugins to grow your enterprise into a global cloud.


Sponsored by https://pockethost.io. Instantly host your PocketBase projects.



Quickstart

npx pockethost serve

Introduction

PocketHost is a multitenant PocketBase hosting system. With it, you can run multiple instances of PocketBase on different subdomains, all on the same server.

Use PocketHost for development or production purposes.

PocketHost can be easily extended using its thoughtful plugin architecture. By choosing additional plugins, PocketHost's features can be extended according to your exact needs. You can even write your own plugins.

The magic serve command

pockethost serve is a special command that can be decorated with plugins. Plugins can respond to the serve command by running their own services.

By convention, plugins that have some kind of serve functionality such as running a server, will make it available in two ways.

The first way runs ONLY the plugin's serve functionality:

pockethost <plugin-name> serve

The second way runs ALL serve functionality from ALL plugins:

pockethost serve

The exact plugins can also be narrowed:

pockethost serve --only=plugin1,plugin2,plugin3

See the plugin authoring guide for more information on how to make a plugin that responds to both methods.

Configuration

PocketHost supports configuration by environment variable, .env file, and also built-in settings via pockethost config.

All PocketHost variables begin with PH_.

PocketHost will search the current directory for an .env when it loads. Anything in .env will be merged with and override any <PH_HOME>/.env that may exist.

Use pockethost config to list and set global defaults.

Core Variables

See pockethost config ls for a full list of variables. Plugin variables will also be listed for loaded plugins.

| Name | Default | Discussion | | -------------- | -------------------------- | ----------------------------------------------------------------------------- | | PH_HOME | ~/.pockethost | PocketHost's home directory where it holds all data. | | PH_APEX_DOMAIN | pockethost.lvh.me | The apex domain used for routing and determining instance names. | | PH_PORT | 3000 | The port PocketHost listens on | | PH_DEBUG | NODE_ENV==='development' | Debug mode | | PH_PLUGINS | (see below) | A comma-separated list of Plugins to load | | PH_DATA_DIR | ~/.pockethost/data | The root directory for storing PocketHost data, including instance databases. | | PH_DEV | NODE_ENV==='development' | Whether PocketHost is running in development mode. |

Default Plugins

  • @pockethost/plugin-console-logger
  • @pockethost/plugin-launcher-spawn
  • @pockethost/plugin-auto-admin

Plugins Directory

PocketHost uses an action/filter architecture to support a growing list plugins. Some plugins have a CLI component, whereas others add purely programmatic support to alter how PocketHost works.

Core plugins

These plugins are maintained by the PocketHost project.

| Name | Description | | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | @pockethost/plugin-console-logger | Routes log messages to the console | | @pockethost/plugin-auto-admin | Auto-creates a default admin account on instance launch | | @pockethost/plugin-launcher-spawn | Launches PocketBase instances via spawn() on the local machine. PocketHost uses this by default | | @pockethost/plugin-cloudflare-request-logger | Log additional data when running behind Cloudflare | | @pockethost/plugin-ftp-server | Used to provide secure FTPS access to PocketBase instance data. This FTP server can run along-side a PocketHost server. | | @pockethost/plugin-local-auth | A light-weight username/password auth provider for associating instances with users. |

Coming soon: | name | description | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | plugin-launcher-docker | Launches PocketBase instances via Docker. This is useful for running untrusted PocketBase code and instances. pockethost.io uses this. | | plugin-waf | A Web Application Firewall | | plugin-waf-enforce-ssl | Enforce SSL at the WAF

Writing Plugins

See the Plugin Authoring Guide for details about how to write your own plugins.

Support

PocketHost has a thriving Discord community.