1.1.13 • Published 6 years ago

astronode-plugin v1.1.13

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Astronode Plugin

npm Build Status Coverage Status bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

This is a simple package with some interfaces to create your on Engine and Data plugins to astronode :)

How to Use It

First of all you need to install the package inside you plugin npm install --save astronode-plugin

EngineAdapter

To create an Engine adapter you will import EngineAdapter from astronode-plugin. After it extends this class an override methods createRoute and start.

createRoute: Will be called everytime when astronode receive a route register request, it comes with the follow parameters: path, method, middlewares, callback
start: Method used to initializate the server.

Example: https://github.com/monumentum/astronode-express-plugin

DataAdapter & DataMethods

To crete an Data adapter you need first of all understand how it works, we had three parts in this process:

  • You need to map the five base methods from a CRUD (find, findById, create, update and delete) using DataMethods interface.
  • You will need extends DataAdapter calling super with the your DataMethods implementation for this ORM.
  • You will need implement a method autoinitializate in your DataAdapter to open database connection and setup.

Example: https://github.com/monumentum/astronode-mongoose-plugin

Contribuiting

// TODO

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.6

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago