Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 14, 2025

モバイルアプリテンプレートリポジトリにAPI実装を追加しました。

技術選定

以下の技術スタックを選定し、実装しました:

  • Node.js v22.14.0 - モバイルアプリと同じランタイム環境
  • Express - 軽量で実績のあるWebフレームワーク
  • TypeScript - 型安全性とモバイルアプリとの一貫性

実装内容

API構造

api/
├── src/
│   └── index.ts          # メインサーバーファイル
├── dist/                 # ビルド出力
├── package.json          # 依存関係とスクリプト
├── tsconfig.json         # TypeScript設定
├── .eslintrc.js          # ESLint設定
├── .prettierrc           # Prettier設定
├── .gitignore            # Git除外設定
└── README.md             # API使用方法

機能

  • セキュリティ: Helmet、CORS対応
  • ログ: Morgan HTTPリクエストログ
  • エラーハンドリング: 統一されたエラーレスポンス
  • サンプルエンドポイント:
    • GET /health - ヘルスチェック
    • GET / - API情報
    • GET /api/users - ユーザー一覧取得
    • POST /api/users - ユーザー作成

開発環境

  • 開発サーバー: npm run dev でホットリロード
  • ビルド: npm run build でTypeScriptコンパイル
  • コード品質: ESLint + Prettier
  • CI/CD: GitHub Actions ワークフロー追加

使用方法

cd api
npm install
npm run dev  # 開発サーバー起動

サーバーは http://localhost:3000 で起動します。

更新されたファイル

  • README.md - 技術選定の反映
  • api/ ディレクトリ - 完全なAPIテンプレートの実装
  • .github/workflows/api-test.yml - API用CI/CDワークフロー

テンプレートとして使いやすく、モバイルアプリ開発者にとって親しみやすい技術スタックを選択しました。

Fixes #2.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdp.expo.dev
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/template-mobile-app/template-mobile-app/mobile-app/node_modules/@expo/cli/build/src/utils/telemetry/clients/flushFetchDetached.js /tmp/f2d2c0cfada125714aced169f4abfa5e/expo-telemetry.json (dns block)
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/template-mobile-app/template-mobile-app/mobile-app/node_modules/@expo/cli/build/src/utils/telemetry/clients/flushFetchDetached.js /tmp/dc6911fee49938764d59b972d7ad9f60/expo-telemetry.json (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@naoki-00-ito naoki-00-ito deleted the copilot/fix-2 branch July 14, 2025 10:20
Copilot AI restored the copilot/fix-2 branch July 14, 2025 10:21
Copilot AI changed the title [WIP] API実装の技術選定 & コード反映 API実装の技術選定 & コード反映: Node.js + Express + TypeScript Jul 14, 2025
Copilot AI requested a review from naoki-00-ito July 14, 2025 10:29
@naoki-00-ito naoki-00-ito reopened this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API実装の技術選定 & コード反映

2 participants