Command Line

Learning Objectives

  • Use the most common commands to navigate and modify files / directories via the terminal window.
  • Initialize a local Git repository and push/pull changes to a remote Git repository.
  • Run basic JavaScript script on the command line using Node.

Review

  • Summarize the client-server model 
  • Review Git, Slack, Sublime
  • Write pseudocode and think programmatically
  • Use HTML and CSS to create static Web pages

Introduction to the Terminal

Command Description Command Description
ls List the contents of the directory subl Open sublime text
cd Change directories pwd Print working directory
mkdir Make directory say Make your computer talk
rmdir Remove empty directories open Open a particular file in their default application
rm Remove files or directories ./ The current folder
touch Create an empty file ../ One folder above your current working directory
echo Return a string ~/ The home folder

Work Point

Practice Command Line

Frameworks

vs

Libraries

Libraries

 With a library the developer is in control. The developer can call functions defined in the library and use them as they want.

 

 Example: JavaScript

Frameworks

 With a framework the developer must work within defined areas. All the control flow is already in the framework, and there's just a bunch of predefined white spots that you can fill out with your code.

 

 Example: Angular or React

Node

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

JavaScript

Run and executed in the browser environment

Node

Run and executed on a back end server

Reference: https://medium.freecodecamp.org/what-exactly-is-node-js-ae36e97449f5

Non-Blocking

JavaScript usually is a single threaded (single function) language. Node allows for the request of a different thread without needing the full response from the first one

Hello World with Node

  • create a directory
  • add a file called 'app.js'
  • add the line console.log('hello world'); into app.js
  • cd into your new directory and run 'node app.js`

NPM

Node Package Manager

Intro to Git/GitHub

https://bit.ly/2qgvAMv

 

July 18: Command Line

By Jessica Bell

July 18: Command Line

  • 105