mirror of
https://github.com/puzzle/lightning-beer-tap.git
synced 2025-12-17 07:04:21 +01:00
removes url and moves README part to Readme under websocket bridge
This commit is contained in:
32
websocket_bridge/README.md
Normal file
32
websocket_bridge/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# WebSocket Bridge
|
||||
|
||||
The WebSocket Bridge connects to the invoces WebSocket provided by a running instance of the https://github.com/puzzle/ln-self-order-pos
|
||||
|
||||
## build java application
|
||||
```bash
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
## how to run
|
||||
|
||||
get the built application from ./build/libs
|
||||
|
||||
```bash
|
||||
java -jar websocket-bridge-0.0.1-SNAPSHOT.jar --url=ws://localhost:8080/websocket/invoice?access_token= --topic=/topic/invoice --command=./dummy_command.sh
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
* url: the websocket url to connect to where the self order point application is running
|
||||
* topic: the topic to subscribe to
|
||||
* command: the shell command that is executed when a message was received on the websocket
|
||||
|
||||
Two Options will be routed to the shell command that is executed
|
||||
|
||||
* --memo
|
||||
* --products
|
||||
|
||||
for example:
|
||||
```
|
||||
./dummy_command.sh --memo="puzzleUp #9c4a Grey Card (CHF 5.00)" --products=PRODUCT_1
|
||||
```
|
||||
@@ -29,7 +29,7 @@ public class WebsocketBridge implements Runnable, DisposableBean {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(WebsocketBridgeApplication.class);
|
||||
|
||||
private static String DEFAULT_URL = "wss://ln-self-order-pos-dev.ose3.puzzle.ch/websocket/invoice?access_token=";
|
||||
private static String DEFAULT_URL = "ws://localhost/websocket/invoice?access_token=";
|
||||
private static String DEFAULT_TOPIC = "/topic/invoice";
|
||||
private static String DEFAULT_COMMAND = "./dummy_command.sh";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user