0.1.1 • Published 3 years ago

flexible-core v0.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
3 years ago

Table of Contents

  1. Introduction
  2. Getting started
  3. Available Frameworks and Event Sources
  4. Architecture
  5. How-tos
    1. How-to build an event source
    2. How-to build a framework
    3. How-to create your logger
    4. How-to create your router
  6. FAQ
  7. Contacts
  8. Issues
  9. License

Flexible

Flexible is a library that helps you build event processing pipelines by connecting Event Sources to Frameworks. Event Sources provide events as javascript objects and flexible routes them through middleware structured according to the Frameworks of your choice.

Getting started

To start using flexible you need to install flexible's core package, one or more event sources and one or more frameworks.

npm install flexible-core
npm install flexible-http #or any other
npm install flexible-decorators #or any other

Once that's done, you need to initialize your app and you are good to go!

----------------------
./index.ts:
----------------------

const httpEventSource = HttpModuleBuilder.instance
    .build();

const decoratorsFramework = DecoratorsFrameworkModuleBuilder.instance
    .withControllerLoader(new ExplicitControllerLoader([
        HelloController
    ]))
    .build();

const application = FlexibleAppBuilder.instance
    .addEventSource(httpEventSource)
    .addFramework(decoratorsFramework)
    .createApp();

application.run().then(status => {
    console.log(JSON.stringify(status));
});

----------------------
./hello-controller.ts:
----------------------

@Controller({ filter: HttpMethod })
export class HelloController {

    @Route(HttpGet)
    public world(): any {
        return "hello world";
    }

}

Available Frameworks and Event Sources

Frameworks

  1. flexible-decorators: a framework that uses typescript decorators to create controllers that shape your pipelines.
  2. flexible-dummy-framework: a framework that helps you to easily create integration tests for newly created event sources.

Event Sources

  1. flexible-http: an event source that allows you to feed and filter http and https events into pipelines.
  2. flexible-dummy-source: an event sources that helps you easily create integration tests for newly created frameworks.

Architecture

A simplified schema of Flexible can be seen below:

Flexible's architecture

  • Flexible Core:
  • Frameworks:
  • Event Sources:
  • User Code:

How do I create an Event Source?

How do I create a Framework?

0.1.1

3 years ago

0.1.0

3 years ago

0.0.22

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago