Skip to content

All resources and notes from the Complete Web Developer in 2018: Zero to Mastery course

Notifications You must be signed in to change notification settings

ritvik2708/complete-web-developer-manual

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

Complete-Web-Developer-Manual

All resources and notes from the Complete Web Developer in 2018: Zero to Mastery course


1. Introduction



2. How The Internet Works



3. History Of The Web



4. HTML 5

Install sublime text 3

Reference websites:


5. Advanced HTML 5



6. CSS

Reference websites:

website for color check:

website for fonts download:


7. Advanced CSS

Reference websites:


8. Bootstrap 4, Templates, And Building Your Startup Landing Page

app for creating users list

website with animation examples

website for patterns:

generating animatied patterns

Installing Github


9. Career Of A Web Developer



10. Javascript



11. DOM Manipulation

Reference websites:


12. Advanced Javascript



13. Command Line

FOR MAC OR LINUX:

ls
Pwd
cd 
cd ..
Clear
Cd / —> root director
Cd ~
Cd folder/folder/test
Mkdir name
Open folder
Touch index.html
Open index.html
Open -a “Sublime Text”
Open .
Mv index.html about.html
Up and down arrow.
Rm file
Rm -r folder
Say hello (only on Mac).

FOR WINDOWS:

dir - list files
cd {directory name} - change directory
cd / - go to root (top) directory
cd .. - go up a level
mkdir {file name} - make a directory
echo > {filename} - create an empty file
del {filename} - remove a file
rmdir {directory name} - remove a directory and all files within
rename {filename} {new filename} - rename a file or folder
start {filename} - open file in default program
start . - open current directory
cls - clear the terminal screen 

14. Developer Environment



15. Git + Github + Open Source Projects

Install Git:

git clone “https:……”
git status
git add “filename”
git add .
git commit –m”message”
git push
git pull
git branch
git branch “name”
git checkout “name”
git merge “name”

Once you are in your forked project directory in your command prompt....

  1. Type git remote -v and press Enter. You'll see the current configured remote repository for your fork.

    a. git remote -v

    b. origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)

    c. origin https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)

  2. Type git remote add upstream, and then paste the URL you would copy from the original repository if you were to do a git clone. Press Enter. It will look like this:

    git remote add upstream https://github.com/zero-to-mastery/PROJECT_NAME.git
    
  3. To verify the new upstream repository you've specified for your fork, type git remote -v again. You should see the URL for your fork as origin, and the URL for the original repository as upstream.

  4. Now, you can keep your fork synced with the upstream repository with a few Git commands. One simple way is to do the below command from the master of your forked repository: git pull upstream master


16. A Day In The Life Of A Developer



17. NPM + NPM Scripts

npm init
npm install
npm install –g browserify

install node and npm

Reference websites:


18. React.js + Redux

npm install –g create-react-app
create-react-app “name”
npm start
npm install tachyons

website for fonts download:

Reference websites:

Action --> Reducer --> Store --> Make changes

npm install redux
npm install react-redux
npm install redux-logger 
npm install redux-thunk

19. HTTP/JSON/AJAX + Asynchronous Javascript



20. Backend Basics



21. APIs



22. FINAL PROJECT: SmartBrain Front-End

Animated objects library:

background patterns:

animated background library:

image and video recognition:

icons library:


23. Node.js + Express.js

Install Postman:

Express.js

(Getting start guide)

npm install body-parser
npm install express --save
npm install --save-dev nodemon

Reference webs:

storing passwords securely:

npm install bcrypt-nodejs
$ npm install bcrypt
1.	/*
2.	* You can copy and run the code below to play around with bcrypt
3.	* However this is for demonstration purposes only. Use these concepts
4.	* to adapt to your own project needs.
5.	*/
6.	 
7.	import bcrypt from'bcrypt'
8.	const saltRounds = 10 // increase this if you want more iterations  
9.	const userPassword = 'supersecretpassword'  
10.	const randomPassword = 'fakepassword'
11.	 
12.	const storeUserPassword = (password, salt) =>  
13.	  bcrypt.hash(password, salt).then(storeHashInDatabase)
14.	 
15.	const storeHashInDatabase = (hash) => {  
16.	   // Store the hash in your password DB
17.	   return hash // For now we are returning the hash for testing at the bottom
18.	}
19.	 
20.	// Returns true if user password is correct, returns false otherwise
21.	const checkUserPassword = (enteredPassword, storedPasswordHash) =>  
22.	  bcrypt.compare(enteredPassword, storedPasswordHash)
23.	 
24.	 
25.	// This is for demonstration purposes only.
26.	storeUserPassword(userPassword, saltRounds)  
27.	  .then(hash =>
28.	    // change param userPassword to randomPassword to get false
29.	    checkUserPassword(userPassword, hash)
30.	  )
31.	  .then(console.log)
32.	  .catch(console.error)

24. FINAL PROJECT: SmartBrain Back-End -- Server

Change localhost:

If you don't want set environment variable, other option - modify scripts part of package.json from:

"start": "react-scripts start"

Linux (tested on Ubuntu 14.04/16.04) and MacOS (tested by @aswin-s on MacOS Sierra 10.12.4) to:

"start": "PORT=3006 react-scripts start"

or (may be) more general solution by @IsaacPak to:

"start": "export PORT=3006 react-scripts start"

Windows @JacobEnsor solution to:

"start": "set PORT=3006 && react-scripts start"

Front-end and back-end connection:

front-end:

fetch('http://localhost:3000/image', {
	method: 'put',
	headers: {'Content-Type': 'application/json'},
	body: JSON.stringify({
		id: this.state.user.id
	})
})
.then(response => response.json())
.then(count => {
	this.setState(Object.assign(this.state.user, { entries:count}))
})

Back-end:

const cors = require('cors')
app.use(cors());

25. Databases

Install PostgreSQL:

data types

terminal commands for windows

login: (-U usuario)

psql -h localhost -U postgres

create database

create database database_name;

show all datatables:

\l

Create a user:

create user moni with password ‘moni’;

delete database

drop database database_name;

connect to a database:

\c database_name;

Create a squema:

create schema friends;

Create a table

create table Friends.test( firstname CHAR(15), lastname CHAR(20)); 

create table Friends.login(id serial not null primary key, secret varchar (100) not null, name text unique not null, entries bigint default 0, joined timestamp not null);

show all information of a table

select * from friends.test;

describe database

\d friends.test

Insert data

insert into friends.test values( ‘Mike’, ‘Smith’); 

insert into friends.test (firstname, lastname )values( ‘Sally’, ‘Jones’);

add a column to an existing table

alter table Friends.test add age smallint;

update data from the table

update friends.test set age = 25 where firstname= ‘Mike’;

delete data from the table

delete from friends.test where firstname = ‘Mike’;

delete column from a tableinae

alter table friends.test drop column age;

delete a table

drop table friends.test;

functions

select avg(age) from friends.test;

join tables

select * from friends.test join friends.login on friends.test.firstname = friends.login.name;

exit

\q

List users in postgres:

\du

List all tables in a squeme:

\d+ nombre_Esquema.*

List all tables in a database :

\dt *.* 

List a table in a squeme:

\d+ nombre_Esquema . nombre_Tabla

Show description of a tavle, columns, type, modifications,....:

\d+ nombre_Tabla

Create a backup of a database:

pg_dum -h localhost -U postgres nombre_Base > nombre_Base.sql

Restore a database: 1. Create a new database where the restore file is going to be placed

psql -U postgres -d nombre_nuevaBase -f respaldo.sql

*Note:  it is important to create the restore in the same root where the database copy is saved. 

Enter to postgres with a user different to postgres:

psql -h localhost -d postgres -U usuario

Enter to a database with a different user:

psql -h localhost -d nombre_base -U nombre_usuario

26. FINAL PROJECT: SmartBrain Back-End – Database

Tool for db connection with back-end


27. Production + Deployment

Environmental variables

PORT

on terminal

bash
-->PORT-3000 node server.js

On server.js

	const PORT = process.env.PORT
	app.listen(PORT, ()=>{
		console.log(`app is running on port ${PORT}`);
	})

DATABASE

on terminal

bash
-->DATABASE_URL-123  node server.js

On server.js

	const DATABASE_URL = process.env. DATABASE_URL
	app.listen(3000, ()=>{
		console.log(`app is running on port ${ DATABASE_URL }`);
	})

OTHER OPTION

On terminal

fish
-->env DATABASE_URL-‘hello’ node server.js

Deploy apps:

Heroku:

Not the best one:

commands for heroku on backend folder: install heroku:

npm install -g heroku
heroku login
heroku create

In the terminal there will be an URL : ” https://limitless-bastion-10041.herokuapp.com/”

git remote –v
git push origin master
heroku git: remote –a limitless-bastion-10041

changes required in:

  • BACKEND: PORT in server.js needs to be changed by an environment variable
  • FRONT: fetch URL needs to be changed by the URL of HEROKU + “:3000”
git push heroku master
for checking errors:
heroku logs --tail
heroku open

connect to pg database:

create on heroku app a new postgress:

Data: Heroku postgres: create new: install heroku postgres: select the app created

heroku addons
heroku info
heroku pg:psql

28. Where To Go From Here?



29. Bonus: AMA + Developer Morning Routine


About

All resources and notes from the Complete Web Developer in 2018: Zero to Mastery course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published