10000 update example · github1/meshage@da11e53 · GitHub
[go: up one dir, main page]

Skip to content

Commit da11e53

Browse files
github1github1
authored andcommitted
update example
1 parent 87e2d51 commit da11e53

File tree

3 files changed

+15
-54
lines changed

3 files changed

+15
-54
lines changed

example/example.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/usr/bin/env bash
22

3+
CLUSTER_NODE=$(docker ps | grep 'example_node-member' | awk '{print $1}')
4+
5+
if [[ -z "${CLUSTER_NODE}" ]]; then
6+
echo "cluster node not found"
7+
exit 0
8+
fi
9+
310
docker exec \
4-
-it $(docker ps | grep node-a | awk '{print $1}') \
11+
-it ${CLUSTER_NODE} \
512
curl http://localhost:8080/api/echo/$RANDOM | jq .

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"author": "",
1010
"license": "MIT",
1111
"dependencies": {
12-
"meshage": "*"
12+
"meshage": "latest"
1313
}
1414
}

package.json

Lines changed: 6 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,17 @@
11
{
2-
"name": "meshage",
2+
"name": "meshage-example",
33
"version": "0.3.9",
4-
"description": "A simple peer-to-peer service mesh for HTTP based message handlers. Messages sent within the service mesh are consistently partitioned across members of the cluster.",
5-
"main": "./src/index.js",
6-
"types": "./src/index.d.ts",
4+
"description": "",
5+
"main": "index.js",
76
"scripts": {
8-
"clean": "rimraf coverage dist tmp",
9-
"watch": "tsc -w -p tsconfig.release.json",
10-
"lint": "tslint --exclude '**/*.js' --project 'tsconfig.json'",
11-
"prepublishOnly": "npm run build && ./prepare.sh",
12-
"pretest": "npm run lint",
13-
"test": "jest --runInBand --coverage --forceExit",
14-
"test:watch": "jest --watch --runInBand",
15-
"build": "npm run -s clean && npm run -s lint && tsc -p tsconfig.release.json",
16-
"build:only": "npm run -s clean && tsc -p tsconfig.release.json"
7+
"test": "echo \"Error: no test specified\" && exit 1"
178
},
189
"author": "John Collier <john.collier4@gmail.com>",
1910
"license": "MIT",
2011
"dependencies": {
21-
"@github1/grapevine": "^1.0.6",
22-
"body-parser": "^1.17.2",
23-
"consul": "^0.33.1",
24-
"debug": "^3.0.1",
25-
"dnode": "^1.2.2",
26-
"express": "^4.15.4",
27-
"express-http-proxy": "^1.0.6",
28-
"hashring": "^3.2.0",
29-
"portfinder": "^1.0.20",
30-
"rsocket-core": "0.0.10",
31-
"rsocket-flowable": "0.0.10",
32-
"rsocket-types": "0.0.10",
33-
"rsocket-tcp-client": "0.0.10",
34-
"rsocket-tcp-server": "0.0.10",
35-
"superagent": "^3.8.3",
36-
"superagent-debugger": "^1.2.9",
37-
"tslib": "1.9.3",
38-
"uuid": "^3.2.1"
39-
},
40-
"devDependencies": {
41-
"@types/body-parser": "^1.16.5",
42-
"@types/consul": "^0.23.32",
43-
"@types/debug": "0.0.30",
44-
"@types/express": "^4.0.37",
45-
"@types/get-port": "4.0.1",
46-
"@types/node": "^8.0.26",
47-
"@types/rsocket-tcp-client": "0.0.1",
48-
"@types/rsocket-tcp-server": "0.0.1",
49-
"@types/superagent": "^3.8.1",
50-
"@types/uuid": "^3.4.3",
51-
"jest": "24.8.0",
52-
"rimraf": "^2.6.1",
53-
"ts-jest": "^23.10.5",
54-
"tslint": "^5.12.1",
55-
"tslint-microsoft-contrib": "^6.0.0",
56-
"typescript": "3.3.3"
57-
},
58-
"publishConfig": {
59-
"access": "public"
12+
"meshage": "latest"
6013
},
14+
"devDependencies": [],
6115
"repository": {
6216
"type": "git",
6317
"url": "https://github.com/github1/meshage"

0 commit comments

Comments
 (0)
0