This project is a Node.js application written in TypeScript. It is built using ESBuild and features logging with Pino. Prerequisites
Node.js (22.x or higher recommended)
pnpm 10.10.0 or higher
Installation
To install dependencies, run the following command: Shell
pnpm install
Usage Development Mode
To run the application in development mode: Shell
pnpm dev
This command builds the application in development mode and runs it immediately. Build
To build the application, use the following commands: Development Build Shell
pnpm build:dev
Production Build Shell
pnpm build:prod
In the production build, the code is obfuscated using JavaScript Obfuscator. Run
To run the built application: Shell
pnpm start
Key Features
TypeScript: A statically typed superset of JavaScript.
ESBuild: An extremely fast JavaScript/TypeScript bundler.
Pino: A high-performance Node.js logging library.
JavaScript Obfuscator: Code protection for production environments.
GitHub Workflow
This project includes a GitHub Actions workflow for Continuous Integration/Continuous Delivery (CI/CD). Workflow Configuration YAML
name: Node.js CI
on: push: branches: [ main, master ] pull_request: branches: [ main, master ]
jobs: build: runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10.10.0
- name: Install dependencies
run: pnpm install
- name: Build (Production)
run: pnpm build:prod
- name: Test
run: pnpm test
This workflow performs the following actions:
Runs on pushes to the main or master branches, or on pull requests to these branches.
Tests with Node.js 18.x.
Uses the pnpm package manager.
Installs dependencies, performs a production build, and runs tests.
Note: The current package.json does not include a test script. Please add a test script to package.json as needed, or remove the test step from the CI configuration. License
GPL-3.0 license
このプロジェクトは、TypeScriptで書かれたNode.jsアプリケーションです。ESBuildを使用してビルドされ、Pinoによるロギング機能を備えています。
- Node.js (22.x以上推奨)
- pnpm 10.10.0以上
依存関係をインストールするには、以下のコマンドを実行してください:
pnpm install開発モードでアプリケーションを実行するには:
pnpm devこのコマンドは、アプリケーションを開発モードでビルドし、すぐに実行します。
アプリケーションをビルドするには、以下のコマンドを使用します:
pnpm build:devpnpm build:prod本番ビルドでは、JavaScript Obfuscatorを使用してコードが難読化されます。
ビルドしたアプリケーションを実行するには:
pnpm start- TypeScript: 型安全なJavaScriptスーパーセット
- ESBuild: 高速なJavaScript/TypeScriptバンドラー
- Pino: 高性能なNode.jsログライブラリ
- JavaScript Obfuscator: 本番環境用のコード保護
このプロジェクトには、継続的インテグレーション/継続的デリバリー(CI/CD)のためのGitHub Actionsワークフローが含まれています。
name: Node.js CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10.10.0
- name: Install dependencies
run: pnpm install
- name: Build (Production)
run: pnpm build:prod
- name: Test
run: pnpm testこのワークフローは以下の処理を行います:
- mainまたはmasterブランチへのプッシュ、またはこれらのブランチへのプルリクエスト時に実行
- Node.js 18.x環境でテスト
- pnpmパッケージマネージャーを使用
- 依存関係のインストール、本番ビルド、テストを実行
注意: 現在のpackage.jsonにはテストスクリプトが含まれていないため、必要に応じてpackage.jsonにテストスクリプトを追加するか、CI設定からテストステップを削除してください。
GPL-3.0 license