Koatty / Koatty
Licence: bsd-3-clause
Koa2 + Typescript = Koatty. Use Typescript's decorator implement IOC and AOP.
Stars: ✭ 67
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Koatty
Doodle
A Simple Java MVC Framework。提供Bean容器、Ioc、Aop、MVC功能
Stars: ✭ 90 (+34.33%)
Mutual labels: springboot, ioc, aop
Swoft
🚀 PHP Microservice Full Coroutine Framework
Stars: ✭ 5,420 (+7989.55%)
Mutual labels: springboot, spring-cloud, aop
Tsed
📐 Ts.ED is a Node.js and TypeScript framework on top of Express to write your application with TypeScript (or ES6). It provides a lot of decorators and guideline to make your code more readable and less error-prone.
Stars: ✭ 1,941 (+2797.01%)
Mutual labels: middleware, koa, ioc
koa-rest-router
Most powerful, flexible and composable router for building enterprise RESTful APIs easily!
Stars: ✭ 67 (+0%)
Mutual labels: middleware, router, koa2
Hyperf
🚀 A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.
Stars: ✭ 4,206 (+6177.61%)
Mutual labels: grpc, apollo-client, aop
Koa Helmet
Important security headers for koa
Stars: ✭ 595 (+788.06%)
Mutual labels: middleware, koa, koa2
Koa Dec Router
An ES6 decorator + class based router, support inherit, override, priority, auto load controllers, etc.
Stars: ✭ 19 (-71.64%)
Mutual labels: koa, koa2, router
Grpc Tools
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.
Stars: ✭ 881 (+1214.93%)
Mutual labels: grpc, middleware
Copper
Copper is a set of Go packages that help you build backend APIs quickly and with less boilerplate.
Stars: ✭ 35 (-47.76%)
Mutual labels: middleware, router
Mysrv
Yet another Node.js web framework, based on koa.js 又一个 Node.js MVC 框架,基于Koa2
Stars: ✭ 10 (-85.07%)
Mutual labels: koa, koa2
Koa Generator
Koa' application generator for 1.x and 2.x( Express-style and support all middlewares include async/await )
Stars: ✭ 929 (+1286.57%)
Mutual labels: koa, koa2
Altair
Lightweight and Robust API Gateway written in Go
Stars: ✭ 34 (-49.25%)
Mutual labels: middleware, router
Kona
a node.js service framework built on koa.js (generators)
Stars: ✭ 23 (-65.67%)
Mutual labels: middleware, koa
Blog demos
CSDN博客专家程序员欣宸的github,这里有四百多篇原创文章的详细分类和汇总,以及对应的源码,内容涉及Java、Docker、Kubernetes、DevOPS等方面
Stars: ✭ 1,030 (+1437.31%)
Mutual labels: springboot, spring-cloud
Egg Authz
egg-authz is an authorization middleware for Egg.js based on Casbin
Stars: ✭ 50 (-25.37%)
Mutual labels: middleware, koa2
Redux Json Router
Declarative, Redux-first routing for React/Redux browser applications.
Stars: ✭ 37 (-44.78%)
Mutual labels: middleware, router
koatty
Koa2 + Typescript = koatty.
Use Typescript's decorator implement IOC and AOP.
Documentation
koatty_doc_CN (In progress💪)
[koatty_doc_EN] come soon...
Installation
npm i -g koatty_cli
Quick Start
1.Create Project
koatty new projectName
cd ./projectName
yarn install
npm start
2.Create a Controller
koatty controller test
3.Create a Service
koatty service test
3.Create a Middleware (Optional)
koatty middleware test
4.Create a Model(Optional)
Supports thinkorm and typeorm. Please expand other ORM by yourself.
//thinkorm
koatty middleware test
//typeorm
koatty middleware -o typeorm test
5.Create a DTOClass (Optional)
koatty dto test
6.Define TestController
import { Controller, BaseController, Autowired, GetMapping, RequestBody, PathVariable, PostMapping, RequestMapping, RequestMethod, Valid } from "koatty";
import { TestDTO } from "../model/dto/TestDTO";
import { TestService } from "../service/TestService";
import { App } from "../App";
@Controller()
export class IndexController extends BaseController {
app: App;
@Autowired()
private testService: TestService;
init() {
this.cache = {};
}
@RequestMapping("/:name", RequestMethod.ALL)
async default(@PathVariable("name") @Valid("IsNotEmpty") name: string) {
const info = await this.testService.sayHello(name).catch((err: any) => this.fail(err.message));
return info;
}
@PostMapping("/test")
@Validated() //need DTOClass
test(@RequestParam() params: TestDTO) {
return this.ok("test", params);
}
}
How to debug
if you use vscode , edit the .vscode/launch.json
, like this:
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "TS Program",
"args": [
"${workspaceRoot}/src/App.ts"
],
"runtimeArgs": [
"--nolazy",
"-r",
"ts-node/register"
],
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "neverOpen"
}
]
}
Select TS Program
to debug run. Try to call http://localhost:3000/
.
Example
Check out the quick start example.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].