0.2.1 • Published 11 months ago

@garycraft/orizuru v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Orizuru

Fully Typed Orizuru Plugin Library. Orizuru is a Server Library to receive Orizuru Plugin Requests.

Example Usage

import { Orizuru } from "@garycraft/orizuru";
import * as express from "express";

// Context is passed to all handlers to allow for state management and other such things.
const express = express();
const context = {}; // Your Context can be anything you want.

// Create an Orizuru instance and pass it the context.
const orizuru = new Orizuru(context);

// Add the Orizoru request handler to your express server.
express.post("/orizuru", orizuru.getExpressHandler());

// Add your handlers.
orizuru.addHandler("Auth", (context, data) => {
    /* Your Login Verification Logic here */
});

orizuru.addHandler("Log", (context, data) => {
    /* Your Server Log Handler here 
    This is called when the Orizuru Plugin sends a log message to the server.
    E.g. When the server starts or stops.
    */
});

// Start your server.
express.listen(3000);
0.2.1

11 months ago

0.2.0

11 months ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago