https://github.com/j-p-d-e-v/web-terminal
A rust app for launching a web terminal that uses websocket.
https://github.com/j-p-d-e-v/web-terminal
rust terminal vue web web-terminal websocket xterm xtermjs
Last synced: 8 months ago
JSON representation
A rust app for launching a web terminal that uses websocket.
- Host: GitHub
- URL: https://github.com/j-p-d-e-v/web-terminal
- Owner: j-p-d-e-v
- License: apache-2.0
- Created: 2024-06-01T15:51:47.000Z (about 2 years ago)
- Default Branch: jp-dev
- Last Pushed: 2024-06-01T17:19:45.000Z (about 2 years ago)
- Last Synced: 2025-04-05T01:41:20.056Z (about 1 year ago)
- Topics: rust, terminal, vue, web, web-terminal, websocket, xterm, xtermjs
- Language: Rust
- Homepage:
- Size: 33.2 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WEB TERMINAL
A rust app for launching a web terminal that uses websocket.
## Run using ```cargo```
```sh
cargo run -- --host 0.0.0.0 --port 3032
```
# Build
```sh
cargo build --release
```
# Deploy
## Help Command:
```sh
cargo run -- --help
Parameters when running the web terminal app.
Usage: web-terminal [OPTIONS]
Options:
--host
The ip of the server.
[default: 127.0.0.1]
--port
The port of the server.
[default: 3030]
--heartbeat-interval
The heartbeat interval.
[default: 30]
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
```
## Run using ```cargo```
```sh
cargo run -- --host 0.0.0.0 --port 3032
```
## Run using the compiled binary file.
Execute binary
```sh
./target/release/web-terminal --host 0.0.0.0 --port 3032
```
# Testing
You can simulate the web terminal using the provided frontend app.
1. Execute docker-compose for the frontend.
```sh
docker-compose -f docker-compose up -d
```
2. Look for the container of the frontend.
```sh
docker ps
Example:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
85a2f260ffda node:latest "docker-entrypoint.s…" 20 hours ago Up 20 hours 0.0.0.0:7060->80/tcp web-terminal-termi-1
```
3. Grab the container id
```sh
docker exec -it e6b8bedb2193 "bash"
```
4. Run the development server.
```sh
yarn dev
```
5. Open browser then go to
```
http://localhost:7060
```
# Developer
JP Mateo (jpmateo022@gmail.com)