bunでNext.jsをインストールする
Build an app with Next.js and Bun
Initialize a Next.js app with create-next-app. This will scaffold a new Next.js project and automatically install dependencies.
create-next-appでNext.jsアプリを初期化します。これで新しいNext.jsプロジェクトが雛形化され、依存関係が自動的にインストールされます。
bun create next-app
To start the dev server with Bun, run bun --bun run dev from the project root.
Bunで開発サーバーを起動するには、プロジェクト・ルートからbun --bun run devを実行する。
cd my-app
bun --bun run dev
To run the dev server with Node.js instead, omit --bun.
代わりにNode.jsで開発サーバーを実行するには、-bunを省略する。
To run the dev server with Node.js instead, omit --bun.
代わりにNode.jsで開発サーバーを実行するには、-bunを省略する。
cd my-app
bun run dev
Open http://localhost:3000 with your browser to see the result. Any changes you make to (pages/app)/index.tsx will be hot-reloaded in the browser.
ブラウザで http://localhost:3000 を開き、結果を確認してください。(pages/app)/index.tsxに加えた変更はすべてブラウザでホットロードされます。
Discussion