beanstalkd-dashboard 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # beanstalkd-dashboard
2
+
3
+ <img src="./assets/logo.svg" style="width: 20em;" />
4
+
5
+
6
+ beanstalkd-dashboard is a monitoring tool for [beanstalkd](https://github.com/beanstalkd/beanstalkd) servers.
7
+
8
+ ## Installation & Usage
9
+
10
+ Install:
11
+ ```sh
12
+ npm i -g beanstalkd-dashboard
13
+ ```
14
+
15
+ Run and open [http://localhost:3000](http://localhost:3000):
16
+ ```sh
17
+ beanstalkd-dashboard # listens on
18
+ ```
19
+
20
+ Listen on specific host/port:
21
+ ```sh
22
+ beanstalkd-dashboard --host 0.0.0.0 --port 1234
23
+ ```
24
+
25
+ Connect to multiple servers:
26
+ ```sh
27
+ beanstalkd-dashboard --servers localhost:11300,beanstalkd1:11300,beanstalkd2:11300
28
+ ```
29
+
30
+
31
+ ### Features
32
+
33
+ #### View All Tubes And Their Stats
34
+
35
+ <img src="./assets/beanstalkd-dashboard home.png" style="width: 40em;" />
36
+
37
+
38
+ #### Manage multiple beanstalkd servers.
39
+ Use `--servers` option to provide multiple beanstalkd server addresses so you can easily manage and monitor them from a single place.
40
+
41
+ <img src="./assets/servers.png" style="width: 20em;" />
42
+
43
+ #### View Tube Details
44
+
45
+ - All the stats about the jobs, executed commands and connections of the tube (automatically refreshed).
46
+ - The next job in `ready`, `delayed` and `buried` states.
47
+
48
+ <img src="./assets/beanstalkd-dashboard-tube-details.png" />
49
+
50
+ #### Pause & Resume Tubes and Display Remaining Time to Resume
51
+
52
+ <video controls src="./assets/beanstalkd-dashboard-pause-resume-tube.mp4"></video>
53
+
54
+ #### Show/Hide Table Columns
55
+ <img src="./assets/beanstalkd-dashboard-show-hide-columns.png" style="width: 15em;" />
56
+
57
+ ### Tech Stack
58
+ - TypeScript
59
+ - [beanstalkd-ts](https://github.com/fatihky/beanstalkd-ts): beanstalkd client with full typescript support. (still in beta)
60
+ - [trpc](https://github.com/trpc/trpc)
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- var _a, _b;
11
10
  import 'reflect-metadata';
12
11
  import { createServer } from 'node:http';
13
12
  import path from 'node:path';
@@ -21,17 +20,19 @@ import z from 'zod';
21
20
  import { BeanstalkdServer } from './beanstalkd.js';
22
21
  import injectionTokens from './injection-tokens.js';
23
22
  import { appRouter } from './router.js';
24
- const host = (_a = process.env.HOST) !== null && _a !== void 0 ? _a : '127.0.0.1';
25
- const port = Number((_b = process.env.PORT) !== null && _b !== void 0 ? _b : '3000');
26
23
  const optionsSchema = z.object({
24
+ host: z.string().default('127.0.0.1'),
25
+ port: z.coerce.number().default(3000),
27
26
  servers: z.string().default('localhost:11300'),
28
27
  });
29
28
  const prog = program
29
+ .option('--host [host]', 'Listen host.', '127.0.0.1')
30
+ .option('--port [port]', 'Listen port.', '3000')
30
31
  .option('--servers <addresses>', 'Beanstalkd server addresses in format [host:port,...] (comma separated). Example: localhost:11300', 'localhost:11300')
31
32
  .parse(process.argv);
32
33
  function main() {
33
34
  return __awaiter(this, void 0, void 0, function* () {
34
- const { servers } = optionsSchema.parse(prog.opts());
35
+ const { host, port, servers } = optionsSchema.parse(prog.opts());
35
36
  const app = express();
36
37
  const server = createServer(app);
37
38
  const bsServers = servers
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "beanstalkd-dashboard",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "bin": "./bin/cli.js",
7
7
  "files": [