Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 01 · Portfolio Projects · Build It Yourself · about 12 min to read

Play it as a journeyTutor comes with a plan

P1: A site and a tool, shipped

S2 - Build a Load Balancer
S2 - Build a Load Balancer · Open board

The board shows a visitor’s request arriving at a front door and a server answering. Your portfolio site is the smallest version of the server on that board: one machine somewhere, holding one page, answering anyone who asks.

Asha Rao (a made-up learner, so the numbers below are teaching values) finishes a course in Python. She applies to 20 companies. Every form asks the same thing: “link to your work”. She has code on her laptop, in a folder called final_final2. Nobody can open a folder on her laptop. A hiring engineer has maybe two minutes per applicant, and a link that does not open costs her the two minutes.

By the end of this lesson you will be able to put one web page and one small command-line tool on the internet, so that a stranger can open the first and run the second, and you will know what each one proves about you.

The history (optional)

Jekyll, a tool that turns plain files into a website, was released by Tom Preston-Werner on 5 November 2008. One timeline of GitHub lists the launch of GitHub Pages, free hosting for such sites, on 18 December 2008. Before that, a beginner who wanted a page online had to rent a server first. Today the hosting step is a setting in a repository.

Before you start. You need to have used a terminal and written one Python file. Git: the ledger every change signs (commits, branches, merge and rebase) gave you commits, which is how your files get from your laptop to a place others can read. What a request actually says (HTTP) showed that opening a page is one request and one answer. DNS Resolution showed how a name like asha-rao.github.io turns into an address. Nothing else is assumed.

Lesson 8 of 19 in Portfolio Projects

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • A static site is a folder of files that a server hands out unchanged
  • Deploying means putting the folder where a server can hand it out
  • A command-line tool takes arguments, prints a result and returns an exit code
  • An exit code is how a tool tells other programs whether it worked
  • A test shows that the tool does what you say
  • What the two things prove together
  • How argparse turns text into values
  • Why main returns a number
  • Edge cases the tests do not yet cover
  • Limits of a static site
  • From a script to an installable tool

Terms it explains: static site, deploy, command-line argument, exit code, Common mistakes, active vs passive, health check, reverse proxy, round-robin.

Review Portfolio Projects