Skip to content

Commit

Permalink
feat: register agent instance ID
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed May 8, 2021
1 parent 4860499 commit b6cbd04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"socket.io-client": "^4.0.1",
"split2": "^3.2.2",
"ulid": "^2.3.0",
"uuid": "^3.4.0",
"yargs": "^16.2.0"
},
"description": "A CLI program for Roarr logger.",
Expand Down
4 changes: 4 additions & 0 deletions src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import {
io,
} from 'socket.io-client';
import split from 'split2';
import {
v4 as uuid,
} from 'uuid';
import yargs from 'yargs';
import {
createLogFormatter,
Expand Down Expand Up @@ -112,6 +115,7 @@ if (argv['api-key']) {
socket = io(argv['api-url'], {
query: {
hostname: os.hostname(),
instance: uuid(),
name: argv.name || os.hostname() + ' ' + nanoid(),
tags: argv.tags || '',
token: String(argv['api-key']),
Expand Down

0 comments on commit b6cbd04

Please sign in to comment.