Git Product home page Git Product logo

koa-mvc's Introduction

Koa-mvc

这是一套基于 koa2 从零开始搭建的 MVC 框架

环境 (Environment)

  • NodeJS v10.13.0
  • MySQL v8.0.13
  • Koa v2.6.2

特点 (Feature)

  1. 使用 koa-jwt + jsonwebtoken 的登录验证方式,适用于MVC, RestfulAPI 的项目架构
  2. 使用 ES7 装饰器语法 decorator 优(zhuāng)雅(bī)地编写路由和控制器
  3. 使用 Sequelize + MySQL 的 ORM 框架

中间件 (Middlewares)

  • koa, koa-logjs, koa-bodyparser, koa-static, koa-compress
  • koa-conditional-get, koa-etag, koa-session, koa-router
  • art-template, koa-art-template
  • sequelize, mysql2
  • koa-jwt, jsonwebtoken, svg-captcha

目录 (Path)

  • app
    • controllers Include Router
    • middleware Middleware Groups
    • sequelize ORM for MySQL
    • views Art-template View
  • logs Koa-logger logs
  • static
  • test Describe it here with Mocha

启动 (Start)

$ yarn install
$ yarn global install nodemon
$ npm start

http://localhost:3000

koa-mvc's People

Contributors

tsurumure avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

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.