Skip to content

AwesomeXR/ah-server

Repository files navigation

ah-server

轻量可扩展的 web server

  • 基于 koa
  • Egg.js 体验
  • app、service、scheduler、context 模块

TL;DR

import { App, Service, IService, Config } from 'ah-helper';

class AService extends Service {
  foo() {
    this.service.b.bar();
  }
}
class BService extends Service {
  bar() {
    this.service.a.foo();
  }
}

class DemoApp extends App {
  service: IService = {
    a: new AService(this),
    b: new BService(this),
  };
}

const app = new DemoApp(new Config());
app.start().catch(() => process.exit(1));

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published