安装包

125 阅读1分钟

项目初始化

npm init

npm init -y

安装项目依赖(包)

npm install npm install 包名 --save npm install 包名 -g npm install 包名@版本号

npm update ...

npm uninstall 包名 -g

接口文档

0.base=http://http://localhost:8000 1.标签操作 1.1. 添加标签 请求地址:http://localhost:8000/tag 请求方法:'POST' 请求参数:

参数名参数类型必填参数说明
textstring标签内容
请求示例:

'''json { "text":"6" } ''' 请求响应:

'''json { status:200,//200代表成功,其他代表失败 data:[],//请求成功之后返回的数据 msg:""//请求失败之后, 返回的错误信息 } '''

postman/apipost

{
  "name": "nodejs",
  "version": "1.0.0",
  "main": "app.js",
  "scripts": {
    "test": "nodemon app.js"
  },
  "author": "",
  "license": "ISC",
  "keywords": [],
  "description": "",
  "dependencies": {
    "jsonwebtoken": "^8.5.1",
    "koa": "^2.13.4",
    "koa-body": "^4.2.0",
    "koa-cors": "0.0.16",
    "koa-router": "^10.1.1",
    "mongoose": "^6.0.13"
  }
}