[ express ]

aex 0.9.6开始原生支持面向对象的Web编程

calidion 发表于 • 2021年01月29日 21:48 • 共 • 38 • 次浏览
import { Aex, http } from "@aex/core";

class HelloAex {
  private message = "aex";
  @http("*", "*")
  public all(_req: any, res: any, _scope: any) {
    res.end("Hello " + this.message + "!");
  }
}

const aex = new Aex();
aex.push(HelloAex);
aex.prepare().start().then(()=> {
});

详情查看github aex.

最后编辑于 • 2021年01月29日 21:52 •  
打赏