All Projects → gravitational → console-demo

gravitational / console-demo

Licence: other
Simplest possible implementation of web-based terminal for Golang backend

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
go
31211 projects - #10 most used programming language
HTML
75241 projects
Makefile
30231 projects

Web-Based Console Demo

This demo was built for the Gitlab team.

It opens a web-based console connected to a /bin/bash running in a virtual terminal on the server side.

Build

Simply type make.

Run

Simply run ./demo and then open http://localhost:5000 You will get a web-based terminal.

TODO

See main.go and replace the path of /bin/bash with the given kubectl command.

That's the simplest implementation of this.

Possible "nice to have" improvements

Detect "window resize" in a browser and pass the new window size into the server via AJAx.

On the server side, call SetSize() on the virtual TTY.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].