Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zetxx/bridg-wrong
nodejs microservice
https://github.com/zetxx/bridg-wrong
Last synced: 3 months ago
JSON representation
nodejs microservice
- Host: GitHub
- URL: https://github.com/zetxx/bridg-wrong
- Owner: zetxx
- Created: 2018-12-03T15:45:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T15:30:21.000Z (5 months ago)
- Last Synced: 2024-10-09T10:39:19.763Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 245 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bridg-wrong
[![Build Status](https://travis-ci.com/zetxx/bridg-wrong.svg?branch=master)](https://travis-ci.com/zetxx/bridg-wrong)
## Filesystem structure
- methods(`lib/methods`): holds registered methods
- wire(`lib/wires`): holds methods### Wire
#### Examle
```javascript
const {Wires, Methods} = require('brid-wrong');
const wires = Wires({.....});
const module1 = Methods({wires});
module1.add({name: 'a.b.c', async(message, {ask, notify}) => {
// request, it will return response
const result = await ask({method: 'b.a.d', params: {......}});
// notification, it will not return any response
notify({method: 'b.a', params: {....}});
return ;
}});
const module2 = Methods({wires});
module2.ask({method: 'a.b.c', params: {a: 1}});
```