Full Stack for Front-Ends Part 2
This course has been updated! We now recommend you take the Full Stack for Front-End Engineers, v2 course.
Table of Contents
Getting Started with Full Stack
Course IntroductionJem Young begins with an overview of the agenda, and sets this course up as an extension, and deeper dive into Full Stack for Front-End.
Full Stack for Frontend Part 1 Recap & PurposeJem recaps the first 'Full Stack for Front-Ends to catch new attendees up to speed. Covered in v1 of this course were some basics like domains vs IP addresses, command line basics, how to create and manage a web server, how to create and deploy system for a Node app and building a basic web page. Jem also discusses the purpose and value of learning full stack.
Basic Server Setup, Updating and User PermissionsJem walks through securely setting up, updating, and logging into a fresh server. He also adds a sudo user with correct privileges, and then switches to that user.
Node setup and installationTo continue the server setup, Jem clone's his github repo, and then he uses NPM to install Node 6, and install the Forever module. Then Jem walks through the dangers of installing these packages in the wrong directories, which can result in incorrect user permissions.
Security OverviewJem starts with an overview of server security by controlling access and securing applications.
Adding SSH keysJem adds an SSH key for the user created earlier, along with covering best SSH practices.
Security SettingsContinuing server security setup, Jem adds a password for root user, disables root login, and disables password login.
FirewallsJem explains the basics of a firewall and using nmap to do a scan report looking for open ports.
Firewall configurations: iptablesMore of a theoretical exercise due to the ease in which you can lock yourself out of your server, Jem walks through how iptables work with some configuration examples and commands.
Firewall configurations: UFW and GUI optionsA better way to control ports on your server than iptables is ufw. Jem shows you how to user ufw to take control of your firewall configuration, along with some GUI options that may be available depending on where your server is hosted.
Automatic UpdatesFirst Jem discusses the importance of automatic updates, then he illustrates how to install and configure them on the server.
Fail2ban: ExerciseIn this exercise, an overview of Fail2ban is explained, and then Jem installs and configures the tool.
Shell Tools: Find and GrepStarting with a very quick overview of ‘What is a shell?’, Jem moves into covering two extremely useful command line tools to find things: find and grep.
Find: ExerciseJem walks through some examples of how to use find, and why mastering this command can be extremely useful.
Grep: ExerciseGrep is another powerful command to help you search your server. Jem illustrates some examples of how to use grep to help you find content within your files.
RedirectionJem describes the power of redirection and redirection operators.
ShellsJem explores the concept of shells and the different types of shells that exist. As an exercise, Jem changes between a few different shells, and then exits to bash.
Shell scriptingJem walks through an example of a shell script and shows the pros and cons of shell scripting.
Bash scripting: ExerciseFirst Jem gives an example of portable shell scripting in bash, and then he talks briefly about chmod and how it controls permissions.
Creating a shell script with Node: ExerciseJem walks through an example of creating a node shell script.
Nginx Setup: InstallationJem starts with an overview of HTTPS, and then completes setting up Nginx while providing tips to make installation easier.
Nginx Setup: proxy traffic to node serverAfter configuring Nginx to send traffic to the node server, Jem starts the node server and confirms his setup is working correctly,
Nginx Setup: Adding a domain name and opening port 443To prepare the server for the HTTPS certificate, Jem edits the Nginx configuration and opens port 443.
Why HTTPSReinforcing good security practices, Jem leads a discussion on what HTTPS is, and why it matters.
Installing HTTPS certificateJem enables HTTPS on his example web server by generating, configuring installing and testing certification with certbot. HE also leads a tour of how to audit the security of your https encryption, and how to update your certificate when it expires.
cronThe origins of the command ‘Cron’ are explored by Jem, as well as its purpose and usage.
cron: ExerciseUsing cron and certbots, Jem sets up auto updates to the HTTP certificate on the example server.
Nginx Tuning: Overview and GzipJem talks about the power of optimizing Nginx, and introduces and sets up gzip for compressing outgoing traffic.
Expires headersJem describes how expires headers control caching between the web server and the client, and we explore how to set these up. Included are some discussions around best practices and common problems with expires headers.
CachingBy setting up caching, Nginx can speed up the server’s hosting while using less resources. Jem walks through how setup and configuration works with caching on his example server.
Websockets: SetupJem starts with an overview of websockets, and then moves into setting up a tunnel in Nginx for websockets to connect with Node, and verifies that this is working on his client web browser.
Websockets: Client-side code and observablesWe explore the client side code interacting with websockets data, and get a brief discussion on observables.
Websockets: ExerciseAs an example using websockets, Jem uses a script created earlier to create a real-time resource graph for the web server on the client.
http/2Jem gives an http/2 overview and talks a bit about its history.
http/2: ExerciseTo illustrate how http/2 works, Jem enables and tests http/2 on his example server.
RedirectAfter describing how to redirect on your website to anywhere on the web, Jem discusses the difference between 301 and 302 redirects.
Database TypesJem explores the differences between relational and non-relational databases, and how to pick your DB type based on usage and requirements.
Exercise: MySQL InstallationIn this exercise, Jem installs and tests MySQL server on the example web server.
Dabase Best PracticesBased on hard-earned personal experience, Jem provides useful tips and best practices for protecting and maintaining your database.
Containers and More
ContainersJem introduces containers, the benefits of containers, and some examples of how they are used.
OrchestrationThe concept of orchestration is discussed with Jem, and a tool and example are explored.
Automated DeploymentsJem briefly shows how using automated deployments can enable you to quickly and accurately spin up many environments like the one built in this course.