nextjs

作者: devevev | 来源:发表于2022-01-18 23:04 被阅读0次

    1.安装node

    <code>

    ➜ js nvm install v16

    </code>

    2.创建项目

    ➜  js npx create-next-app@latest

    过程中需要输入项目名称

    3.运行

    ➜  nextjs-test1 git:(main) npm run dev

    > dev

    > next dev

    ready - started server on 0.0.0.0:3000, url: http://localhost:3000

    4. 在page下面创建一个home.js

    function HomePage() {

        return <div>Welcome to Next.js!</div>

      }

      export default HomePage

    刷新 localhost:3000/home

    相关文章

      网友评论

          本文标题:nextjs

          本文链接:https://www.haomeiwen.com/subject/jnslhrtx.html