Skip to content

Commit

Permalink
Renamed monitor to mediator
Browse files Browse the repository at this point in the history
  • Loading branch information
macterra committed Mar 7, 2024
1 parent 1967370 commit d5b7a76
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ jobs:
file: Dockerfile.hyperswarm
push: true
tags: |
${{ env.REGISTRY }}/keychainmdip/hyperswarm-monitor:${{ steps.calver.outputs.version }}
${{ env.REGISTRY }}/keychainmdip/hyperswarm-monitor:release
${{ env.REGISTRY }}/keychainmdip/hyperswarm-mediator:${{ steps.calver.outputs.version }}
${{ env.REGISTRY }}/keychainmdip/hyperswarm-mediator:release
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile.hyperswarm
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ RUN npm ci
COPY *.js ./

# Run...
CMD ["node", "hyperswarm-monitor.js"]
CMD ["node", "hyperswarm-mediator.js"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $ npm install
Start the services in separate terminals:
```
node server.js
node hyperswarm-monitor.js
node hyperswarm-mediator.js
```

OR
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
build:
context: .
dockerfile: Dockerfile.hyperswarm
image: macterra/hyperswarm-monitor
image: macterra/hyperswarm-mediator
environment:
- GATEKEEPER_URL=http://gatekeeper:3000
volumes:
Expand Down
3 changes: 2 additions & 1 deletion hyperswarm-monitor.js → hyperswarm-mediator.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import asyncLib from 'async';

import * as gatekeeper from './gatekeeper-sdk.js';
import * as cipher from './cipher.js';
import config from './config.js';

import { EventEmitter } from 'events';
EventEmitter.defaultMaxListeners = 100;
Expand Down Expand Up @@ -193,7 +194,7 @@ const discovery = swarm.join(topic, { client: true, server: true });

// The flushed promise will resolve when the topic has been fully announced to the DHT
discovery.flushed().then(() => {
console.log(`connecting to gatekeeper at ${gatekeeper.URL}`);
console.log(`connecting to gatekeeper at ${config.gatekeeperURL}`);
console.log(`hyperswarm peer id: ${peerName}`);
console.log('joined topic:', b4a.toString(topic, 'hex'));
});
Expand Down

0 comments on commit d5b7a76

Please sign in to comment.