安装

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

  1. git clone https://github.com/arunoda/learnnextjs-demo.git
  2. cd learnnextjs-demo
  3. git checkout clean-urls

你可以运行它:

  1. npm install
  2. npm run dev

现在您可以通过浏览进入应用程序 http://localhost:3000.