Installation
Prerequisites
A machine with:
Node.js and NPM installed. Download the Node.js source code or a pre-built installer for your platform here!
Angular CLI installed. Angular CLI is the official tool for initializing and working with Angular projects. Install it by executing the following command in a new terminal:
Python websockets library installed. This is a library for developing WebSocket servers and clients in Python. Install it by executing the following command:
$ npm install -g @angular/cli
$ pip install websockets
Installation Option 1: Download code and run packaged executable
1. Clone the web-terminal repository
$ git clone https://github.com/danielle-galvao/web-terminal.git
$ cd web-terminal
2. Install necessary Node.js modules
$ npm install
3. Install project package
$ pip install web_terminal
3. Run packaged executable
$ python -m web_terminal
Installation Option 2: Download code and build manually
1. Clone the web-terminal repository
$ git clone https://github.com/danielle-galvao/web-terminal.git
$ cd web-terminal
2. Navigate to root folder of Angular app
$ cd web-terminal/client
3. Install necessary Node.js modules
$ npm install
3. Build app for production
$ ng build --prod
Running and Usage
Running
Once you have completed all the instructions to install and build the Web-Terminal app, you can perform the following steps to get the Web-Terminal app running:
Note: If you followed the steps for Installation Option 1, the app's web server will already be running. You can skip Steps 1 and 2 below and begin at Step 3.
1. Navigate to project's server folder
$ cd web-terminal/server
2. Start the app's web server. Running this command will start serving the Web-Terminal interface on your localhost.
$ python web_terminal.py
The message provided upon running contains the localhost address including the port number which the server is running on:
* Running on http://127.0.0.1:5000/
3. To view the Web-Terminal app, open browser of choice and navigate to that localhost address.
Usage
Once you have completed the above steps to start running Web-Terminal, you are now ready to begin using the terminal interface! Here's how:
1. Authenticate yourself using provided one-time token/password to begin using the terminal interface.
For security purposes, upon opening the Web-Terminal app in your browser, you will reach an Authentication Page. This page will require you to enter a unique one-time token/password for that terminal session. The message provided upon running the command to start the app's web server (Step 2 of Running Instructions) will provide you with the necessary token:
Starting web server, your token is: EXAMPLETOKEN
Enter this token exactly as given to you (token is case-sensitive) where you are prompted on the Authentication Page to "Enter one-time password." Press the "Authenticate" button to begin your terminal session.
2. Upon successful authentication, you will reach the Web-Terminal terminal interface page. Click adjacent to the command line prompt "$" to begin entering text. Type your command and arguments and press Enter on your keyboard to execute.
Web-Terminal supports many standard Linux commands.
Note: Your initial working directory will be the directory from which you executed the command to run the server
3. Start programming! Make sure to first learn about all of Web-Terminal's features so you can take full advantage of all the tools and helpful technologies we've added to provide users with the best terminal experience possible!