Fancy working with your shell in a browser? Read on!

Setting up a Go backend for Xterm.js to get a shell over the browser

I swear it’s preTTY cool

TL;DR/Shameless Plug

Here’s a short clip of what Cloudshell can do
docker run -p 8376:8376 zephinzer/cloudshell:latest

The planning

1/6 – the stand-alone terminal

<div id="terminal" />
var terminal = new Terminal({/* ... options ... */});
terminal.open(document.getElementById(“terminal”));

2/6 – the connection

// ... (following is in Go)
upgrader := websocket.Upgrader{
ReadBufferSize: 512,
WriteBufferSize: 512,
}
connection, err := upgrader.Upgrade(w, r, nil)
// ...

3/6 – the shell in the cloud

4/6 – k9s in the cloud

5/6 – making it extensible

6/6 – making it deployable

… And it was done!

on Technology, Software Engineering, and DevOps 🤘🏼 (and a little on growing people these days - a sign of the times 🥲)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store