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

@hakoniwajs/node

v0.1.8

Published

箱庭諸島2 (TypeScript 版) の Node.js アダプタ。`hakoniwa serve` で node:sqlite をストレージにした HTTP サーバーが起動する

Readme

@hakoniwajs/node

箱庭諸島2 (TypeScript 版) の Node.js Adapter です。node:sqlite によるストレージ、HTTP サーバー、ファイルバックアップ、CLI を提供します。

使い方

Node.js 22.13 以上が必要です。

$ npm install @hakoniwajs/node
$ HAKONIWA_BASE_URL=http://localhost:3000 npx hakoniwa serve

http://localhost:3000/ でゲームが起動します (DB は既定で ./hakoniwa.db に作成されます)。

hakoniwa serve は、待ち受け先を指定しないとすべてのインターフェースで待ち受けます。このときは HAKONIWA_BASE_URL が必要で、未設定だとエラーを出して終了します。HAKONIWA_HOST=127.0.0.1 (または localhost、::1) でループバックだけにすると省略でき、http://localhost:<実際のポート> になります。この URL はリクエストの Host ヘッダからは決めません。0.0.0.0 や ::、LAN や公開アドレスで待ち受けるときも必須です。値を設定したときは、待ち受け先に関係なくその URL を使います。Cloudflare 版は未設定ならリクエストのオリジンを使います。

CLI

$ npx hakoniwa --help
$ npx hakoniwa db init          # ゲームを初期化して開始
$ npx hakoniwa db status        # 現在の状態を表示
$ npx hakoniwa turn check       # 期限が来ていればターンを進める
$ npx hakoniwa backup list|create|restore|delete

主な環境変数

| 変数 | 内容 | | ----------------------- | -------------------------------------------------------------------------------------- | | HAKONIWA_BASE_URL | 公開 URL。ループバック待ち受けでは省略でき http://localhost:<ポート>。それ以外は必須 | | HAKONIWA_HOST | 待ち受けアドレス。未指定は全インターフェース。ループバックなら 127.0.0.1 など | | HAKONIWA_AUTH_SECRET | 任意。セッション署名・CSRF の鍵。未設定なら初回起動時に自動生成して DB に保存 | | HAKONIWA_DB_PATH | SQLite DB のパス (既定 ./hakoniwa.db) | | HAKONIWA_PUBLIC_DIR | 静的アセットのパス (既定は同梱の @hakoniwajs/core/public) | | HAKONIWA_ADMIN_EMAILS | 任意。管理者ユーザーのメールアドレス (カンマ区切り) | | HAKONIWA_DEV_LOGIN | true で開発ログインを有効化 (本番では false) |

HAKONIWA_ADMIN_EMAILS を設定しない場合は、ログインしてから /admin/setup を開き、サーバーのコンソールに出力されるセットアップコードを入力すると最初の管理者になれます (以後は管理画面から管理者を追加・削除できます)。

全項目は 環境変数一覧 を参照してください。

License

オリジナルの利用条件に従います (LICENSE)。同梱画像の商用利用はできません。