Giter VIP home page Giter VIP logo

koa-rudy's Introduction

koa-rudy

环境

node -v >=6.9.0 pm2

启动

    npm install
    npm run dev

开发环境

    npm run dev || test || prod

接口测试

    npm run mocha

推荐开发工具

vscode

实现

  1. 支持 async/await
  2. MVC架构(middleware-view-controller)
  3. RESTful api 接口设计
  4. 支持对接SOA服务
  5. 支持 Docker 构建发布
  6. 接口测试
  7. 日志文件系统
  8. 适配不同开发环境 => dev,test,prod

目录介绍

|- bin 程序入口 |- config 配置文件 |- app 路由和视图 |- |- apis 客户端 api |- |- service 对接soa实现主业务 |- |- views 视图 |- middleware 中间件 |- assets 静态资源 图片/font等 |- utils 工具库 |- test 测试 |- logs 日志

middleware

  1. api
  2. body
  3. log
  4. static
  5. view
  6. cookie
  7. service

业务分层

API 收集处理客户端请求数据,将处理好的数据发给service. SERVICE 主业务层,根据业务逻辑分块,去不同的soa请求数据进行封装反馈给API. SOA 每个SOA单独模块封装,以HTTP协议请求数据,不做数据封装.

Jenkins

使用 Jenkins docker image

docker

dockerFile

部署

    sh deploy.sh

技术模块及文档地址

  1. koa 文档
  2. 路由模块koa-router 2
  3. Promise网络请求axios
  4. ejs模板渲染
  5. 工具相关 5.1 lodash文档 5.2 fs-extra 5.3 fs-pipe 5.4 koa-router-interceptor

6.静态资源拉取逻辑

koa-rudy's People

Contributors

slashhuang avatar

Stargazers

Cyijun avatar onyX avatar botKoa avatar Jun Zhou (Finger) avatar  avatar mh avatar Lin avatar TroyMa avatar LuJ avatar Yanqi Zong avatar Sunrise avatar rambo avatar Chandler Huang avatar haizhilin avatar  avatar  avatar 小撸 avatar jinjianhua avatar  avatar  avatar  avatar 邹聪 avatar guwm avatar  avatar ypli avatar  avatar lancui avatar lxlzq11 avatar  avatar  avatar Enzo avatar 墨白 avatar

Watchers

Zhuxy avatar James Cloos avatar  avatar realjade avatar KMBaby avatar  avatar Enzo avatar lancui avatar  avatar  avatar wenhao 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.