0.1.0 • Published 6 years ago

@emitterware/app v0.1.0

Weekly downloads
-
License
-
Repository
-
Last release
6 years ago

@emitterware/app

The extensible basis of all emitterware applications

Usage

const { App } = require("@emitterware/app");
const { http } = require("@emitterware/http");

const app = new App();

// Subscribe to the HTTP event provider
app.subscribe(http({
  port: 3000
}));

// Unsubscribe from the HTTP event provider
app.unsubscribe("http");

const httpMiddleware = async ctx => {
  ctx.response.body = {
    hello: "world"
  }
};

// Register an event middleware
app.on("http", httpMiddleware);

// Unregister an event middleware
app.off("http", httpMiddleware)
0.1.0

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.1

7 years ago