anthonychu / interactive-terminal

Interactive terminal demo using Xterm.JS and Node.JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Interactive web-based terminal

Requirements:

  • NodeJS >= v16 and NPM

Setup process

There are two parts to this, the frontend and backend, just like a typical web application.

To get the backend running use the following steps:

  • cd into the directory.
  • Run npm install to pull in dependencies.
  • Run node backend.js to start the WebSocket the frontend will be connecting to.

There is not much to do regarding the frontend except to open up index.html in the browser.

The WebSocket port number is hard coded thus 6060. Feel free to change it in backend.js Also, don't forget to update the WebSocket URL in frontend.js.

There is also a complete tutorial detailing how different parts of the code work.

Changelog

  • V1 - Improved to support 1:1 mirroring of an actual terminal e.g: Vim works with this implementation
  • V2 - Initial release.

About

Interactive terminal demo using Xterm.JS and Node.JS

License:Apache License 2.0


Languages

Language:JavaScript 71.2%Language:Dockerfile 15.2%Language:HTML 13.6%