Git Product home page Git Product logo

kmsp-api's Introduction

kmsp-api

运行

确保数据库连接配置正确,配置文件为 config.js,且存在数据库 dev_db。

推荐使用 nodemoon 或者 pm2

# 常规启动
npm run start
# or
node bin/www

# nodemon 工具启动
npm run dev
# or
npx nodemon bin/www

# pm2 工具启动
npm run prd

浏览器访问 localhost:3000

生成项目基本结构

  1. npm i -g koa-generator
  2. koa2 kmsp-api

Tips

  1. 启动配置
  2. 创建 app 对象
  3. 注册路由
  4. 引入数据模型文件,并执行

GraphQL 相关

  • 请求方式 get/post/put/delete ?
  • graphql-client ? apollo-server ?
  • 与数据库交互 ? 联表 ?
  • 分页? 上传? 鉴权?

TODO

  • 联表操作
  • 登录、鉴权
  • 发布生产
  • nodemon / pm2
  • 下载文件
  • 上传文件
  • socket
  • CRUD

kmsp-api's People

Watchers

 avatar  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.