欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

koa2

程序员文章站 2022-03-29 16:25:25
...
C:\Users\guo\Desktop\testapi>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> --save` afterwards to install a package and
save it as a dependency in the package.json file.

Press ^C at any time to quit.
name: (testapi)
version: (1.0.0)
description: 测试api
entry point: (index.js)
test command:
git repository:
keywords:
author: 郭东生
license: (ISC)
About to write to C:\Users\guo\Desktop\testapi\package.json:

{
  "name": "testapi",
  "version": "1.0.0",
  "description": "测试api",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "郭东生",
  "license": "ISC"
}


Is this ok? (yes)

C:\Users\guo\Desktop\testapi>
C:\Users\guo\Desktop\testapi>

 

一键生成koa/koa2项目:
1、 npm install -g koa-generator
2、新建项目目录  koa mytest (koa1项目)  koa2 koa2test (koa2项目)
3、进入目录 cd koa2test
4、安装依赖 npm install
5、运行 npm start



以上就是koa2的详细内容,更多请关注其它相关文章!

相关标签: koa2