创建web服务器
D:\Vue\VueExample>npm install -g live-server
C:\Users\yang\AppData\Roaming\npm\live-server -> C:\Users\yang\AppData\Roaming\npm\node_modules\live-server\live-serv
er.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\live-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"
any"} (current: {"os":"win32","arch":"x64"})
+ live-server@1.2.0
added 236 packages from 152 contributors in 31.237s
初始化前端项目(生产package.json文件,记录包的使用)
D:\Vue\VueExample>npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg>` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
package name: (vueexample)
version: (1.0.0)
description: Vue Demo
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to D:\Vue\VueExample\package.json:
{
"name": "vueexample",
"version": "1.0.0",
"description": "Vue Demo",
"main": "index.js",
"directories": {
"example": "example"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this OK? (yes)
启动前端项目
D:\Vue\VueExample>live-server
Serving "D:\Vue\VueExample" at http://127.0.0.1:8080
Ready for changes
GET /favicon.ico 404 4.183 ms - 24
^C终止批处理操作吗(Y/N)? y
三、手动创建live-server前端服务器
原创wx5bddc0ab0cfc8 ©著作权
文章标签 Vue live-server 文章分类 前端开发
©著作权归作者所有:来自51CTO博客作者wx5bddc0ab0cfc8的原创作品,请联系作者获取转载授权,否则将追究法律责任
手动创建live-server前端服务器
上一篇:六、v-for循环
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章