mirror of https://github.com/apibillme/broker
Compare commits
5 Commits
c7128c45be
...
9db76e4800
Author | SHA1 | Date |
---|---|---|
Bevan Hunt | 9db76e4800 | |
Bevan Hunt | bde8966864 | |
Bevan Hunt | 940ad2ece9 | |
Bevan Hunt | aee7b072fa | |
Bevan Hunt | b55bd1f711 |
|
@ -451,7 +451,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "broker"
|
name = "broker"
|
||||||
version = "6.0.3"
|
version = "6.0.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-std",
|
"async-std",
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
[package]
|
[package]
|
||||||
name = "broker"
|
name = "broker"
|
||||||
version = "6.0.3"
|
version = "6.0.8"
|
||||||
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
|
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
keywords = ["sse", "api", "baas", "broker", "real-time"]
|
keywords = ["sse", "api", "baas", "broker", "real-time"]
|
||||||
description = "Real-time BaaS (Backend as a Service)"
|
description = "Real-time BaaS (Backend as a Service)"
|
||||||
repository = "https://github.com/apibillme/broker"
|
repository = "https://github.com/apibillme/broker"
|
||||||
|
categories = ["web-programming::http-server", "database-implementations", "authentication"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
10
README.md
10
README.md
|
@ -14,7 +14,7 @@ Broker follows an insert-only/publish/subscribe paradigm rather than a REST CRUD
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* Very performant with a almost no CPU and memory usage
|
* Very performant with almost no CPU and memory usage
|
||||||
* Under 500 lines of code
|
* Under 500 lines of code
|
||||||
* Secure Real-time Event Stream via SSE - requires the use of [broker-client](https://www.npmjs.com/package/broker-client)
|
* Secure Real-time Event Stream via SSE - requires the use of [broker-client](https://www.npmjs.com/package/broker-client)
|
||||||
* Supports CORS
|
* Supports CORS
|
||||||
|
@ -57,9 +57,9 @@ POST /users
|
||||||
- public endpoint
|
- public endpoint
|
||||||
- POST JSON to create a user
|
- POST JSON to create a user
|
||||||
```json
|
```json
|
||||||
{"username":{...}, "password":{...}, "collection_id":{...}, "tenant_id":{...}}
|
{"username":{...}, "password":{...}}
|
||||||
```
|
```
|
||||||
- where {...} is for username and string, password a string, collection_id is the uuid of the event collection for user info, tenant_id is the uuid of the tenant
|
- where {...} is for username is a string and password is a string
|
||||||
|
|
||||||
will return `200` or `500` or `400`
|
will return `200` or `500` or `400`
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ POST /login
|
||||||
```json
|
```json
|
||||||
{"username":{...}, "password":{...}}
|
{"username":{...}, "password":{...}}
|
||||||
```
|
```
|
||||||
- where {...} is for username a string and password a string
|
- where {...} is for username is a string and password is a string
|
||||||
|
|
||||||
will return
|
will return
|
||||||
```json
|
```json
|
||||||
|
@ -88,7 +88,7 @@ GET /sse
|
||||||
```
|
```
|
||||||
- authenticated endpoint (Authorization: Bearer {jwt})
|
- authenticated endpoint (Authorization: Bearer {jwt})
|
||||||
- connect your sse-client to this endpoint using [broker-client](https://www.npmjs.com/package/broker-client)
|
- connect your sse-client to this endpoint using [broker-client](https://www.npmjs.com/package/broker-client)
|
||||||
- note: broker-client uses fetch as eventsource doesn't support headers
|
- `note`: broker-client uses fetch as eventsource doesn't support headers
|
||||||
|
|
||||||
#### Step 4 - insert an event
|
#### Step 4 - insert an event
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue