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

2 years ago

0.1.15

2 years ago

0.1.14

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago