メモ > 技術 > フレームワーク: Next.js > 起動
起動
>cd C:\path\to\next_project
>npx create-next-app next_app
Need to install the following packages:
create-next-app@14.2.3
Ok to proceed? (y)
√ Would you like to use TypeScript? ... No / Yes
√ Would you like to use ESLint? ... No / Yes
√ Would you like to use Tailwind CSS? ... No / Yes
√ Would you like to use `src/` directory? ... No / Yes
√ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to customize the default import alias (@/*)? ... No / Yes
Creating a new Next.js app in C:\localhost\home\test\public_html\react\next_app.
next_app フォルダが作成され、その中にファイルが作成される
プロジェクトの操作はこのフォルダ内で行うため、フォルダ内に移動しておく
>cd next_app
以下でプロジェクトを実行する
>npm run dev
> next_app@0.1.0 dev
> next dev
▲ Next.js 14.2.3
- Local:
http://localhost:3000
Starting...
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
Ready in 6.6s
上記のように表示され、表示されている
http://localhost:3000 にアクセスするとページが表示される
Advertisement