--- index.ts
--- controllers
|------ A.controller.ts
Install typescirpt and setup carefull for decorator You shoud install ts-node-dev for development
import { Controller, Get, PathParam, Post } from "miumiu";
@Controller("/hello")
export class AController {
@Get('/')
public async get_live(
){
return {"OK"};
}
@Post('/')
public async get_die(
@Require() @BodyParam('abc') cookies : string[]
){
return {cookies};
}
}
import { Server } from "miumiu";
new Server({port: 8080}).start();
ts-node-dev index.ts