Skip to content

restrainhalation/training-honox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

training-honox

HonoX の学習用リポジトリです。

ローカル環境

構築

  1. 開発ツールをインストール

    Volta
    # Volta をインストール
    curl https://get.volta.sh | bash
    
    # Node.js 22.6.0 をインストール
    volta install node@22.6.0
    
    # Volta が現在アクティブにしている Node.js のバージョンを確認
    volta list node -c
    
    # Node.js のバージョンを確認
    node -v
    Bun
    # Bun をインストール
    curl -fsSL https://bun.sh/install | bash
  2. 設定ファイル wrangler.toml を作成
    name = "training-honox"
    compatibility_date = "2024-04-01"
    compatibility_flags = [ "nodejs_compat" ]
    pages_build_output_dir = "./dist"
    
    [[d1_databases]]
    binding = "DB"
    database_name = "training-honox"
    database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    preview_database_id = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"
    migrations_dir = "./db/migrations"
  3. 実行環境を作成
    # パッケージをインストール
    bun i
    
    # マイグレーションを適用
    yes | bun wrangler d1 migrations apply training-honox --local

実行

# 開発サーバー
bun run dev
# プロダクションビルドのプレビュー
bun run build
bun run preview

About

🔰 HonoX の学習用リポジトリです。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors