2022-07-05创建nuxt.js

nuxt.js是一个SSR服务器渲染框架,优点是:首页加载速度快,在服务器上加载完整的带数据,javascript,css的html结构。缺点是:服务器任务重,适合静态页面。
1:npm5后都自带npx:E:\Node_js>npx -v 6.14.11检查是否安装npx
2:E:\Node_js>npx create-nuxt-app 502link_h5创建名字
3:填选一些选项:create-nuxt-app v4.0.0
✨ Generating Nuxt.js project in 502link_h5
? Project name: 502link_h5
? Programming language: JavaScript
? Package manager: Npm
? UI framework: None
? Nuxt.js modules: (Press to select, to toggle all, to invert selection)
? Linting tools: (Press to select,
to toggle all, to invert selection)
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Server (Node.js hosting)
? Development tools: (Press to select,
to toggle all, to invert selection)
? What is your GitHub username? (李————)
? Version control system: Git
4:选择上述提供的命令:

To get started:

    cd 502link_h5
    npm run dev

5:打开浏览器 :Listening: http://localhost:3000/
6:在vscode中导入项目开始写;
7:创建构成中的注意点:

如何打开别人的nuxt.js文件:
npm i
npm run dev

你可能感兴趣的:(2022-07-05创建nuxt.js)