Submodule 2.1: Popular tools

Site: ΕΛ/ΛΑΚ Moodle
Course: Study / Web Design and Web Development
Book: Submodule 2.1: Popular tools
Printed by: Guest user
Date: Friday, 26 April 2024, 12:14 AM

Description

  • Terminal
  • Node.js - NPM

Your terminal

In simple words, Terminal is a software which takes the command from your keyboard and passes it to the Operating System of your computer.  It's also called Command Line Interface - CLI or Windows PowerShell.

In the following image, you can see the ways you can enable Terminal, either from the Menu orfrom the Taskbar of your computer.

Enabling terminal

After enabling the Terminal a new window appears on your screen.

Terminal View

The basic commands of Terminal

  • Write help and press Enter to see a lot of things you could do!
  • Write clear and press Enter to start again!
  • Write pwd and press Enter to see the name of the working directory. [/home/ellak]
  • Write ls and press Enter to list all files and directories in the working directory.
  • Suppose that we want to move to the Desktop directory. Write cd De and press the Alt tab. You will see that the Terminal auto-completes the expression. Press Enter to move into the Desktop directory.
  • Write again cd and drag a folder from the Desktop and drop it into the Terminal to see what will happen after pressing Enter. [This command will open the folder!]
  • Write cd.. and press Enter to move upwards in the hierarchy of the directories.
  • Write exit and press Enter to close the Terminal window.

If you want to learn more about these commands click here

Node.js - NPM

Node.js is an open-source, cross-platform JavaScript environment that executes JavaScript code server-side.

Historically, JavaScript was used primarily for client-side scripting. Node.js lets developers use JavaScript for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.

NPM is the pre-installed Node package manager for the Node.js server platform. It installs Node.js programs from the npm registry, organizing the installation and management of third-party Node.js programs. 

These environments are already installed on your computer. To verify it, open your Terminal and write node -v or npm -v. The versions of node or npm package will appear on your screen as results of these commands.

Why do we need Node and npm;

We will use npm to install different libraries (e.g Bootstrap), to initiate local servers to watch our code, to create files etc.

We don't need deep comprehension of these ecosystems, but if you want to learn more follow the links.

Exercise

  1. What version of node and npm does your computer have?

Solution:

node version: v8.11.1
npm version: 5.6.0