【Next.js】Restful API

133 阅读1分钟

创建应用

npx create-next-app@latest

删除不必要的配置与文件

002quickstart.png

本地运行

npm i
npm run dev

访问接口

http://localhost:3000/api/hello

003api.png