0.2.2 • Published 1 year ago

@garycraft/orizuru v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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.2

1 year ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.16

3 years ago

0.1.15

3 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago