安装

首先,我们需要一个简单的Next.js应用来玩。 尝试下载以下示例应用程序:

  1. git clone https://github.com/arunoda/learnnextjs-demo.git
  2. cd learnnextjs-demo
  3. git checkout create-dynamic-pages

你可以运行:

  1. npm install
  2. npm run dev

现在,您可以通过导航到 http://localhost:3000/ 访问该应用程序。