Giter Site home page Giter Site logo

foyzulkarim / terminal-in-browser Goto Github PK

View Code? Open in Web Editor NEW
37.0 4.0 8.0 1.33 MB

This is an adventurous project where I aimed to input terminal commands in browser and execute them in server, and through websocket protocol show the actual terminal updates into the browser in real time.

TypeScript 63.17% JavaScript 1.45% HTML 11.61% CSS 23.77%
nodejs node express expressjs react reactjs child-process worker-threads exec terminal

terminal-in-browser's Introduction

Terminal in browser

Welcome to the repo. ๐Ÿ™‚ This is an adventurous project where I aimed to take inputs as terminal commands in browser and execute those commands in server, and through websocket protocol show the actual terminal updates into the browser in real time. I have tested to executing multiple long-running commands from different browser in parallel, and verified each browser only receiving own command progress results.

Architecture diagram

alt text

YouTube demo

Watch demo

Example output

Execute terminal commands to your server from browser

> ping www.google.com

Pinging www.google.com [2404:6800:4001:808::2004] with 32 bytes of data:
Reply from 2404:6800:4001:808::2004: time=3ms 

Reply from 2404:6800:4001:808::2004: time=3ms 
Reply from 2404:6800:4001:808::2004: time=4ms 
Reply from 2404:6800:4001:808::2004: time=3ms 

Ping statistics for 2404:6800:4001:808::2004:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 4ms, Average = 3ms
Done

Technology

  • TypeScript
  • Express.js
  • React.js
  • Special Node modules (child_process, events etc.)
  • Socket.io
  • terminal-in-react npm library

Installation and run the projects

  • Install server side packages and start server
$ npm install
$ npm start
  • Install client side packages and start client
$ cd client
$ yarn
$ yarn start

View the website at: http://localhost:3000

License

MIT

terminal-in-browser's People

Contributors

foyzul-seek avatar foyzulkarim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.