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

@donneko/tyoi-server

v0.0.5

Published

Small local API and static file server framework built with Express and TypeScript.

Downloads

646

Readme

tyoi-server

NPM Version NPM License

小さな API と静的ファイル配信をすぐに立てるための、ローカル向けサーバーフレームワークです。 CLI でテンプレートを作り、HTML / CSS / API / WebSocket の動作確認をすばやく始められます。

This project is experimental. APIs may change in future releases.

Features

  • Express ベースの API / 静的ファイル配信
  • JavaScript / TypeScript テンプレート
  • WebSocket 対応
  • Local / Network URL 表示
  • LAN 公開、QR Code 表示、ブラウザ自動起動
  • 使用中ポートの自動切り替え
  • Express middleware と設定ファイル対応

Quick Start

TypeScript テンプレートで始める場合:

npm exec --package @donneko/tyoi-server tyoi -- create my-app --template basic-ts
cd my-app
npm install
npm run dev

JavaScript テンプレートで始める場合:

npm exec --package @donneko/tyoi-server tyoi -- create my-app --template basic-js
cd my-app
npm install
npm run dev

起動後、表示された Local URL をブラウザで開くと、public/main のページを確認できます。

今いるディレクトリにテンプレートを作る場合は init を使います。

mkdir my-app
cd my-app
npm exec --package @donneko/tyoi-server tyoi -- init my-app --template basic-ts
npm install
npm run dev

Programmatic Usage

コードから小さな API サーバーを作る場合は tyoi() を使えます。

import { tyoi } from "@donneko/tyoi-server";

const app = tyoi({
    baseDirname: import.meta.dirname,
    publicDirname: "../public/main",
    port: 3000
});

app.get("/hello", () => {
    return {
        message: "Hello Tyoi!"
    };
});

await app.start();

Templates

  • basic-ts: TypeScript 用テンプレート
  • basic-js: JavaScript 用テンプレート

テンプレートを指定しない場合は、CLI 上で選択できます。

npm exec --package @donneko/tyoi-server tyoi -- create my-app

Common CLI

作成済みプロジェクトでは、ローカルにインストールした tyoi を npm scripts から使えます。

tyoi create my-app --template basic-ts
tyoi init my-app --template basic-ts
tyoi config
tyoi info
tyoi run
tyoi run --port 3001
tyoi run --open
tyoi help
tyoi --version

主なコマンド:

  • tyoi create <name>: 新しいフォルダにテンプレートを作成
  • tyoi init <name>: 今いるフォルダにテンプレートを作成
  • tyoi config: 今いるフォルダに tyoi.config.js を追加
  • tyoi info: tyoi run で使われる設定を表示
  • tyoi run: 現在のプロジェクトの設定でサーバーを起動
  • tyoi dev: このパッケージの開発確認用サーバーを起動
  • tyoi help: コマンド一覧を表示

Docs

詳しい使い方は doc/ に分けています。

  • Usage: tyoi() の基本、API、WebSocket、middleware、イベント、Server 直接利用
  • Config: tyoi.config.js と設定項目
  • CLI: CLI コマンドとオプション

Development

このリポジトリを開発する場合:

npm install
npm test
npm run build

公開前には、公開パッケージに含まれるファイルを確認してください。

npm pack --dry-run
npm publish --dry-run

License

MIT