Giter Club home page Giter Club logo

koa2-myblog's Introduction

我的个人站服务端代码

基于koa2 + mongoose

MyBlog 后台接口说明:

  • 用户查询接口
  url: /u/getUser
  type: GET
  data: {
    email: 用户邮箱号码 //String
  }
  result: {
    status: 0表示失败 1表示成功
    data: 返回的用户信息
  }
  • 用户注册接口
  url: /u/saveUser
  type: POST
  data: {
    email: 用户邮箱号码 //String
    name: 用户名 //String
  }
  result: {
    status: 0表示失败 1表示成功
    data: 返回的用户信息
  }
  • 更新留言接口
  url: /m/showMsg
  type: GET
  data: {
    msgId: 最后一条留言的Id 会返回ID之后的20条 若请求首屏则输入1 // String
  }
  result: {
    status: 0表示失败 1表示成功
    data: 返回请求的留言信息 // Array * 20
  }
  • 保存留言接口
  url: /m/saveMsg
  type: POST
  data: {
    email: 用户邮箱 // String
    message: 留言内容 // String
  }
  result: {
    status: 0表示失败 1表示成功
    data: 返回留言信息 
  }
  • 留言点赞接口
  url: /m/upSup
  type: POST
  data: {
    msgId: 被点赞留言的ID //String
    upNum: 被点赞的次数 //Number
  }
  result: {
    status: 0表示失败;1表示成功
    data: 操作信息
  }
  • 本站点赞接口
  url: /u/upSup
  type: GET
  data: {}
  result: {
    status: 0表示失败;1表示成功
    data: 返回点赞数
    response: 操作信息
  }
  • 获取本站点赞数接口
  url: /u/showSup
  type: GET
  data: {}
  result: {
    status: 0表示失败;1表示成功
    data: 返回点赞数
  }

更新用户留言管理api(crm文件夹)

koa2-myblog's People

Contributors

arthuryung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.