Skip to content
This repository was archived by the owner on Dec 2, 2023. It is now read-only.

Commit 118b8c4

Browse files
committed
(fix): script and example
1 parent 6fc0e09 commit 118b8c4

3 files changed

Lines changed: 11 additions & 25 deletions

File tree

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ app:
2222
clean:
2323
rm -rf bin
2424

25-
start-bin:
25+
scripts-start-services:
26+
./scripts/all start
2627

27-
start-services:
28-
docker network create ionnet || true
29-
docker-compose -f docker-compose.yml up -d redis nats
28+
scripts-stop-services:
29+
./scripts/all stop
3030

31-
stop-services:
32-
docker-compose -f docker-compose.yml stop redis nats
31+
docker-start-services:
32+
docker-compose pull
33+
docker network create ionnet
34+
docker-compose -f docker-compose.yml up
3335

34-
run:
35-
docker-compose up --build
36+
docker-stop-services:
37+
docker-compose -f docker-compose.yml stop
3638

3739
test: go_deps start-services
3840
go test \

examples/ion-echo/main.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ const join = async () => {
4242
console.log('[onleave]: leave room, reason ' + reason);
4343
};
4444

45-
function Uint8ArrayToString(fileData){
46-
var dataString = "";
47-
for (var i = 0; i < fileData.byteLength; i++) {
48-
dataString += String.fromCharCode(fileData[i]);
49-
}
50-
return dataString;
51-
}
52-
5345
room.onmessage = function (msg){
5446
console.log('[onmessage]: Received msg:', msg)
5547
const uint8Arr = new Uint8Array(msg.data);

examples/ion-pubsub/main.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ const join = async () => {
5050
console.log('[onleave]: leave room, reason ' + reason);
5151
};
5252

53-
function Uint8ArrayToString(fileData){
54-
var dataString = "";
55-
for (var i = 0; i < fileData.byteLength; i++) {
56-
dataString += String.fromCharCode(fileData[i]);
57-
}
58-
return dataString;
59-
}
60-
6153
room.onmessage = function (msg){
6254
console.log('[onmessage]: Received msg:', msg)
6355
const uint8Arr = new Uint8Array(msg.data);
@@ -302,4 +294,4 @@ function syntaxHighlight(json) {
302294
return '<span class="' + cls + '">' + match + "</span>";
303295
}
304296
);
305-
}
297+
}

0 commit comments

Comments
 (0)