0.0.1 |
|
---|
#24 in #build-web
360KB
2.5K
SLoC
Dispatcher - the platform to build web platforms
Purpose
The purpose of this library is to be your platform to build web platforms.
Dispatcher is a SSE message dispatcher that requires you write no backend code to have a full real-time API.
Dispatcher is born from the need that rather than building a complex REST API with web-sockets and a SQL database to provide reactive web forms (like for React) there must be a simpler way.
Dispatcher follows an insert-only/publish/subscribe paradigm rather than a REST CRUD paradigm.
Install
cargo install dispatcher
- the origin needs to be passed in as a flag - wildcard is supported - default http://localhost:3000
- the port needs to be passed in as a flag - default 8080
- the expiry (for jwts) needs to be passed in as a flag - default 3600
- the secret (for jwts) needs to be passed in as a flag - default secret
- the conection needs to passed in as a flag (http or https) - default http
- the key-path needs to passed in as a flag if connection https - default ./broker.rsa
- the cert-path needs to passed in as a flag if connection https - default ./broker.pem
- the save_path where the embedded database will save needs to be passed in as an environment variable
- example: SAVE_PATH=./tmp/dispatcher_data dispatcher --port 8080 --connection https --origin http://localhost:3000 --expiry 3600 --secret secret --key-path ./dispatcher.rsa --cert-path ./dispatcher.pem
Documentation
License
MIT License
Copyright (c) [2020] [Bevan Hunt]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Dependencies
~27–41MB
~772K SLoC