1 unstable release
0.1.0 | Jun 1, 2024 |
---|
#329 in WebSocket
33KB
257 lines
WEB TERMINAL
A rust app for launching a web terminal that uses websocket.
Run using cargo
cargo run -- --host 0.0.0.0 --port 3032
Build
cargo build --release
Deploy
Help Command:
cargo run -- --help
Parameters when running the web terminal app.
Usage: web-terminal [OPTIONS]
Options:
--host <HOST>
The ip of the server.
[default: 127.0.0.1]
--port <PORT>
The port of the server.
[default: 3030]
--heartbeat-interval <HEARTBEAT_INTERVAL>
The heartbeat interval.
[default: 30]
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Run using cargo
cargo run -- --host 0.0.0.0 --port 3032
Run using the compiled binary file.
Execute binary
./target/release/web-terminal --host 0.0.0.0 --port 3032
Testing
You can simulate the web terminal using the provided frontend app.
- Execute docker-compose for the frontend.
docker-compose -f docker-compose up -d
- Look for the container of the frontend.
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
- Grab the container id
docker exec -it e6b8bedb2193 "bash"
- Run the development server.
yarn dev
- Open browser then go to
http://localhost:7060
Developer
JP Mateo (jpmateo022@gmail.com)
Dependencies
~14–25MB
~369K SLoC