1.0.3 • Published 4 years ago
plugjs-registry v1.0.3
Simple middleware on plug to plugjs-server
**OBS This library is in the beginning and it is very basic
How to use this lib, is very simple!
First config plug.json on root project directory
{
"server": {
"name": "<Your AppName>", // default gen uuid
"port": 3333,
"host": "127.0.0.1" // or your host Ip!
},
"registry": {
"target": "REGISTRY_SERVICES",
"register": false,
"queue": {
"port": 5672,
"host": "localhost"
}
}
}
Now Initialize your server
// My Favorite node.js framework from manage requests!
import express from 'express'
// ES6 Modules!
import Server from 'plugjs-server'
import Registry from 'plugjs-registry'
// CommonJS
const { start, register } = require('plugjs-server').default;
const { middleware } = require('plugjs-registry').default;
// REGISTRING MIDDLEWARE
register(provider.key, provider.middleware);
// Up Server
Initializer.Server.start(app);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.