Skip to content

Commit

Permalink
Remove run_monitor.js
Browse files Browse the repository at this point in the history
Close #405
  • Loading branch information
FabijanC committed Mar 5, 2021
1 parent b6e66ee commit ed4de1d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"type": "node",
"request": "launch",
"name": "Monitor",
"program": "${workspaceFolder}/scripts/run_monitor.js",
"program": "${workspaceFolder}/dist/monitor/monitor.js",
"envFile": "${workspaceFolder}/environments/.env",
"preLaunchTask": "npm: build:lerna",
"outFiles": [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"dev:server:local": "npm run build:ui && TESTING=true ./scripts/run_server.sh",
"build:ui": "cd ./ui/ && npm install && npm run build",
"monitor:build": "npm run clean && npm run build",
"monitor:start": "node ./scripts/run_monitor.js",
"monitor": "rimraf ./dist && tsc && node ./scripts/run_monitor.js",
"monitor:start": "node ./dist/monitor/monitor.js",
"monitor": "rimraf ./dist && tsc && node ./dist/monitor/monitor.js",
"monitor:ci": "scripts/monitor_ci.sh",
"server:build": "npm run clean && npm run build",
"server:start": "node ./dist/server/server.js",
Expand Down
6 changes: 0 additions & 6 deletions scripts/run_monitor.js

This file was deleted.

1 change: 0 additions & 1 deletion src/Dockerfile.monitor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ COPY services/core ./services/core
COPY services/validation ./services/validation
COPY services/verification ./services/verification
COPY src ./src
COPY scripts/run_monitor.js ./scripts/
COPY *.json ./
RUN npx lerna bootstrap && npx lerna run build

Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
},
server: {
port: process.env.SERVER_PORT || 5000,
url: process.env.SERVER_URL || "http//localhost:5000"
url: process.env.SERVER_URL || "http://localhost:5000"
},
localchain: {
port: process.env.LOCALCHAIN_PORT || 8545,
Expand Down
5 changes: 5 additions & 0 deletions src/monitor/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,9 @@ export default class Monitor {
this.chainMonitors.forEach(cm => cm.stop());
this.sourceFetcher.stop();
}
}

if (require.main === module) {
const monitor = new Monitor();
monitor.start();
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"declaration": true,
"module": "commonjs"
},
"include": ["./src", "src/run_monitor.js", "src/localchain.js", "src/cli"]
"include": ["./src", "src/localchain.js", "src/cli"]
}

0 comments on commit ed4de1d

Please sign in to comment.