Better logging

This commit is contained in:
folex 2019-08-18 10:53:15 +03:00
parent d5b24bfdad
commit 13b6912b65
2 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,6 @@ export function addMessage(message: string, username: string): void {
export function getMessages(username: string | null): string { export function getMessages(username: string | null): string {
if (username) { if (username) {
let request = let request =
`SELECT json_group_array( `SELECT json_group_array(
json_object('message', message, 'username', username) json_object('message', message, 'username', username)

View File

@ -21,11 +21,12 @@ echo
sleep 1 && (docker logs -f frun 2>&1 &) | grep -q initialized && sleep 1 sleep 1 && (docker logs -f frun 2>&1 &) | grep -q initialized && sleep 1
# Send our username to the application # Send our username to the application
echo -e "Sending request..." REQUEST="$USER"
echo "curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'$USER --compressed" echo -e "Sending request: $REQUEST"
echo "curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed"
echo echo
RESPONSE=$(curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$USER" --compressed | jq -r .result.data | base64 -D) RESPONSE=$(curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed | jq -r .result.data | base64 -D)
echo -e "$RESPONSE\n" echo -e "$RESPONSE\n"