termites 1.0.0 → 1.0.1
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 +3 -1
- package/bin/termites.js +5 -5
- package/client.js +1 -1
- package/package.json +1 -1
- package/server.js +1 -1
package/README.md
CHANGED
|
@@ -22,6 +22,8 @@ A web-based terminal with server-client architecture for remote shell access.
|
|
|
22
22
|
npm install -g termites
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
> **Note**: The `-g` flag is required for the `termites` command to be available globally.
|
|
26
|
+
|
|
25
27
|
## Usage
|
|
26
28
|
|
|
27
29
|
### Start Server
|
|
@@ -30,7 +32,7 @@ npm install -g termites
|
|
|
30
32
|
termites server
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
The server starts on port
|
|
35
|
+
The server starts on port 6789 by default. Access the web UI at `http://localhost:6789`.
|
|
34
36
|
|
|
35
37
|
To use a different port:
|
|
36
38
|
|
package/bin/termites.js
CHANGED
|
@@ -13,13 +13,13 @@ Usage:
|
|
|
13
13
|
termites client [url] Connect to a server
|
|
14
14
|
|
|
15
15
|
Options:
|
|
16
|
-
PORT=<port> Set server port (default:
|
|
16
|
+
PORT=<port> Set server port (default: 6789)
|
|
17
17
|
|
|
18
18
|
Examples:
|
|
19
|
-
termites server Start server on port
|
|
19
|
+
termites server Start server on port 6789
|
|
20
20
|
PORT=8080 termites server Start server on port 8080
|
|
21
|
-
termites client Connect to ws://localhost:
|
|
22
|
-
termites client 192.168.1.100:
|
|
21
|
+
termites client Connect to ws://localhost:6789
|
|
22
|
+
termites client 192.168.1.100:6789
|
|
23
23
|
`);
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ const rootDir = path.join(__dirname, '..');
|
|
|
33
33
|
if (command === 'server') {
|
|
34
34
|
require(path.join(rootDir, 'server.js'));
|
|
35
35
|
} else if (command === 'client') {
|
|
36
|
-
const serverUrl = args[1] || 'ws://localhost:
|
|
36
|
+
const serverUrl = args[1] || 'ws://localhost:6789';
|
|
37
37
|
process.argv = [process.argv[0], path.join(rootDir, 'client.js'), serverUrl];
|
|
38
38
|
require(path.join(rootDir, 'client.js'));
|
|
39
39
|
} else {
|
package/client.js
CHANGED
|
@@ -3,7 +3,7 @@ const os = require('os');
|
|
|
3
3
|
const WebSocket = require('ws');
|
|
4
4
|
|
|
5
5
|
const SHELL = process.env.SHELL || '/bin/bash';
|
|
6
|
-
const SERVER_URL = process.argv[2] || 'ws://localhost:
|
|
6
|
+
const SERVER_URL = process.argv[2] || 'ws://localhost:6789/client';
|
|
7
7
|
|
|
8
8
|
function getSystemInfo() {
|
|
9
9
|
const username = os.userInfo().username;
|
package/package.json
CHANGED