Giter VIP home page Giter VIP logo

koa-web's Introduction

Language : English | 简体中文

Koa Web

The best scaffolding of building Koa2 restful API with TypeScript.

license Gitter GitHub Release GitHub Workflow Status (branch)

Features

  • 💡 TypeScript: support TypeScript
  • Commitlint:git commitlint
  • 🎨 Prettier:prettier lint code
  • 🚀 Exception:Global exception handling
  • ✈️ Validator:Practical and efficient data validation usage
  • MySQL:Support for MySQL database connections
  • 🔥 Redis:Support for Redis database connections
  • 🔢 Log:Log SQL and error logs
  • Unit Test:Support unit test
  • 📝 API Doc:API Doc UI

Usage

If you are not using the pnpm tool, using npm and yarn are the same to achieve the same performance.

  1. install dependencies

    $ pnpm install
    
  2. start app

    $ pnpm start
    or
    $ pnpm prod
    
  3. lint code

    $ pnpm lint
    
  4. run test

    $ pnpm test
    

Project Layout

├── .husky                  // hooks - here start pre-commit and commitlint
├── coverage                // test output
├── build                    // build output
├── logs                    // log output
│   ├── error               // error log
│   └── info                // info log
├── src
│   ├── app.ts              // koa start
│   ├── app                 // app modules
│   ├── config              // env config
│   ├── typings             // ts type
│   └── core                // core mudules
│       ├── init.ts         // core start
│       ├── global.ts       // global var
│       ├── tool.ts         // tool
│       ├── exception       // global exception
│       ├── log             // log modules
│       ├── mysql           // mysql modules
│       ├── redis           // redis modules
│       ├── swagger         // api docs
│       └── validator       // data validator
├── test                    // jest test.ts
├── .cz-config.js           // commitlint tip
├── .editorconfig           // lint config
├── .gitignore
├── .prettierignore
├── .prettierrc             // prettier style config
├── commitlint.config.ts    // commit-lint config
├── jest.config.js          // jest test config
├── LICENSE
├── package.json
├── pnpm-lock.yaml
├── README.md
└── tsconfig.json

License

MIT

Copyright (c) 2022-present, Zeffon Wu

koa-web's People

Contributors

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