-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.tropicRPC.config.js
More file actions
69 lines (67 loc) · 2.37 KB
/
.tropicRPC.config.js
File metadata and controls
69 lines (67 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
'use strict';
// add config details here
const config = {
// change "./server/index.js" to the relative path from the root directory to the file that starts your server
entry: './server.js',
// change 3000 to the port number on which your server runs
portNumber: 40000,
// populate '' with the IP address of your server (exclude portNumber)
ipAddress: '',
// change "./demo.proto" to the relative path from the root directory to your proto file
protoFile: './demo.proto',
// change "protoPackage" to your proto package's name
protoPackage: 'tropicalAnimals',
};
// after activating Tropic extension, add request(s) here and save this file to execute
const requests = {
// customize your request values below
unarySendRequest1: {
service: 'ManageService',
method: 'sendAnimal',
message: { id: 1, animal: 'shoebill', sound: 'pop-pop' },
},
// unarySendRequest2: {
// service: 'ManageService',
// method: 'sendAnimal',
// message: { id: 2, animal: 'capuchin monkey', sound: 'squeak' },
// },
// unaryReadRequest3: {
// service: 'ManageService',
// method: 'getAnimals',
// message: {},
// },
// ServerStreamingRequest4: {
// service: 'ManageService',
// method: 'getStreamAnimals',
// message: {},
// },
// ClientStreamingRequest5: {
// service: 'ManageService',
// method: 'sendStreamAnimals',
// message: {
// 0: { animalId: 2, animal: 'rhinoceros', sound: 'grunt' },
// 1: { animalId: 2, animal: 'cassowary', sound: 'rumble' },
// 2: { animalId: 2, animal: 'jaguar', sound: 'roar' },
// },
// },
// BidirectionalStreamingPingPongRequest6: {
// service: 'ManageService',
// method: 'sendAndGetAnimalSoundsPingPong',
// message: {
// 0: { animalId: 2, animal: 'rhinoceros', sound: 'grunt' },
// 1: { animalId: 2, animal: 'cassowary', sound: 'rumble' },
// 2: { animalId: 2, animal: 'jaguar', sound: 'roar' },
// },
// },
// BidirectionalStreamingNonPingPongRequest7: {
// service: 'ManageService',
// method: 'sendAndGetAnimalSoundsPost',
// message: {
// 0: { animalId: 2, animal: 'rhinoceros', sound: 'grunt' },
// 1: { animalId: 2, animal: 'cassowary', sound: 'rumble' },
// 2: { animalId: 2, animal: 'jaguar', sound: 'roar' },
// },
// },
};
module.exports = { config, requests };
//# sourceMappingURL=configTemplate.js.map