Web Development with Go

Learn to build real, production-grade web applications from scratch.

  • 👉 No trivial TODO apps that barely touch the complexity of a real app.
  • 👉 No frameworks that hide all the details.

In this course we build and deploy a photo sharing application complete with users, authentication, image uploads, a database, and more. We even deploy to a production server and set up automatic HTTPS.

"All you need is the standard library"

- Everyone on r/golang

I can't tell you the number of times I heard this when learning to build my first web app in Go. After a while, it started to haunt me. It isn't that this advice is incorrect; it just isn't that helpful by itself.

It felt like someone was telling me, "You can build a house, all you need is a hardware store!" And I kept hearing it over and over again.

While this advice is mostly true - you absolutely can build a web app in Go using nothing but the standard library - it wasn't helpful. It didn't get me any closer to building a real application. I was still left with questions like:

  • How should I share a database connection with my http handlers while not making it a global variable?
  • How can I securely hash a user's password and build an authentication system?
  • How should I be organizing my code? MVC? Domain Driven Design? Hexagonal? Something else?
  • What about REST? How does that fit into this all?

What I really needed was guidance. Someone to show me the correct way to build a web application so I didn't waste countless hours figuring it out myself.

Web Applications are Complex Systems

No matter how many tutorials I read, I always felt like there was something left out. Some part of the bigger picture that wasn't explained, leaving me unsure of how to proceed. Or the tutorial was oversimplified to the point that it felt useless in the grand scheme of things.

After building several TODO apps I nearly gave up. My progress was painfully slow, and every time I figure out one major problem I would be left with two new questions that weren't addressed by the oversimplified tutorials.

In the end, I was lucky. I happened to have a history building web applications using other programming languages, and with that knowledge I was able to piece things together. It wasn't quick or easy, but it all slowly started to make sense.

What if you didn't have to struggle through hundreds of tutorials?

What if you didn't have to go through the painful process I did to learn how to build web services in Go? What if you could skip reading hundreds of tutorials all teaching roughly the same thing just to get one new tidbit of information out of it? You would finally be ready to build that application you have been considering, or apply for that job you had your eye on.

Web Development with Go will help you cut through all the complexity and finally become the developer you know you should be.

"Web development with Go absolutely saved me from giving up on Go. Before finding this course I kept hitting roadblock after roadblock. I can't tell you how excited I was when I realized just how approachable and productive this course is. I went from struggling to get even the most basic tasks completed to actually building out my own app idea. I can't wait to release it!"

Web Development with Go is the course I wish I had

This course takes everything I have learned over years of building web applications and distills it into easy to consume lessons. By the end of the course you will build a complete web application, deploy it to a production server, and understand why you took every step along the way. You will also...

  • Know exactly how to initialize your database connection and share it without resorting to global variables or other hard to test anti-patterns.
  • Feel confident saying, "Yes, my authentication system is safe and secure!"
  • Understand how to organize your code, and how to weigh the trade-offs of various code structures.
  • Have clear examples of how to email users and build a complete "Forgot your password?" workflow.
  • And so much more!

This is possible because this is not your run of the mill course. It is a comprehensive breakdown of every little detail you need to know when building and deploying a real web application.

Web Development with Go spans nearly 40 hours of screencasts, and the ebook is roughly 700 pages. Even after completing the course, you will be referencing the material for years to come.

Jon does a great job of taking the large task of creating a web application and breaks it down into steps that are easy to understand and follow along with. If you want to learn how web development works at its very core I can't recommend it enough.

Liam Randall

Want to sample the course?

Watch 14 screencasts for free!

Interested in checking out a sample of the course to see if it is a good fit for you? No problem! Sign up to my mailing list below and I'll send over a course preview that includes 14 screencasts.

    Not sure if you want to provide your email address just yet? Here is the first lesson, no signup needed 😁

    What You Will Build

    and Deploy!

    Throughout the course you will be building LensLocked, a photo sharing application. Users can sign up, create galleries, and upload photos to create a gallery. After a gallery is completed it can be published, making it publicly accessibly to anyone with the URL.

    While building the application we will learn about uploading images, interacting with a PostgreSQL database, limiting access to resources you have permission to edit, and if you purchase one of the packages with bonus material we will also look at how to integrate with a third party API like Dropbox using OAuth.

    I loved the Web Development with Go course. Excellent content and very well presented. A unique opportunity to tap into the knowledge of an experienced developer and great teacher.

    Robin Brandt

    Simple Pricing with Lifetime Access.

    Trusted by over 4000 developers

    Complete Package

    The complete package includes everything you need to learn web development with Go. Over 180 screencasts spanning nearly 40 hours, written versions of every lesson, all the bonus content, access to the Web Development with Go Slack, source code, and FREE updates for life!

    Pay once, own it forever

    $124.50 $249

    Save 50% until Nov 29

    The Lessons

    A whole lot of them!

    I am currently in the process of re-recording the entire course. Sections 1 through 16 are released and are composed of 160 lessons. The remaining sections (17 onwards) are still in progress and will be released as they are completed. You can read more about the updates here.

    Section 1: Getting Started
    A Basic Web Application (Sample)
    Troubleshooting and Slack
    Packages and Imports (Sample)
    Editors and Automatic Imports (Sample)
    The "Hello, World" Part of our Code (Sample)
    Web Requests (Sample)
    HTTP Methods (Sample)
    Our Handler Function (Sample)
    Registering our Handler Function... (Sample)
    Go Modules (Sample)
    Section 2: Adding New Pages
    Dynamic Reloading (Sample)
    Setting Header Values (Sample)
    Creating a Contact Page (Sample)
    Examining the http.Request Type (Sample)
    Custom Routing (Sample)
    URL Path vs RawPath
    Not Found Page
    The http.Handler Type
    The http.HandlerFunc Type
    Exploring Handler Conversions
    FAQ Exercises
    Section 3: Routers and 3rd Party Libraries
    Defining our Routing Needs
    Using git
    Installing Chi
    Using Chi
    Chi Exercises
    Section 4: Templates
    What are Templates?
    Why Do We Use Server Side Rendering?
    Creating Our First Template
    Cross Site Scripting (XSS)
    Alternative Template Libraries
    Contextual Encoding
    Home Page via Template
    Contact Page via Template
    FAQ Page via Template
    Template Exercises
    Section 5: Code Organization
    Code Organization
    MVC Overview
    Walking Through a Web Request with MVC
    MVC Exercises
    Section 6: Starting to Apply MVC
    Creating the Views Package
    fmt.Errorf
    Validating Templates at Startup
    Must Functions
    Exercises
    Section 7: Enhancing our Views
    Embedding Template Files
    Variadic Parameters
    Named Templates
    Dynamic FAQ Page
    Reusable Layouts
    Tailwind CSS
    Utility-first CSS
    Adding a Navigation Bar
    Exercises
    Section 8: The Signup Page
    Creating the Signup Page
    Styling the Signup Page
    Intro to REST
    Users Controller
    Decouple with Interfaces
    Parsing the Signup Form
    URL Query Params
    Exercises
    Section 9: Databases and PostgreSQL
    Intro to Databases
    Intalling Postgres
    Connecting to Postgres
    Update: Docker Container Names
    Creating SQL Tables
    Postgres Data Types
    Postgres Constraints
    Creating a Users Table
    Inserting Records
    Querying Records
    Filtering Queries
    Updating Records
    Deleting Records
    Additional SQL Resources
    Section 10: Using Postgres with Go
    Connecting to Postgres with Go
    Imports with Side Effects
    Postgres Config Type
    Executing SQL with Go
    Inserting Records with Go
    SQL Injection
    Acquire a new Record's ID
    Querying a Single Record
    Creating Sample Orders
    Querying Multiple Records
    ORMs vs SQL
    Exercises
    Syncing the Book and Screencasts Source Code
    Section 11: Securing Passwords
    Steps for Securing Passwords
    Third Party Authentication Options
    What is a Hash Function?
    Store Password Hashes, Not Encrypted or Plaintext Values
    Salt Passwords
    Learning bcrypt with a CLI
    Hashing Passwords with bcrypt
    Comparing a Password with a bcrypt Hash
    Section 12: Adding Users to our App
    Defining the User Model
    Creating the UserService
    Create User Method
    Postgres Config for the Models Package
    UserService in the Users Controller
    Create Users on Signup
    Sign In View
    Authenticate Users
    Process Sign In Attempts
    Section 13: Remembering Users with Cookies
    Stateless Servers
    Creating Cookies
    Viewing Cookies with Chrome
    Viewing Cookies with Go
    Securing Cookies from XSS
    Cookie Theft
    CSRF Attacks
    CSRF Middleware
    Providing CSRF to Templates via Data
    Custom Template Functions
    Adding the HTTP Request to Execute
    Request Specific CSRF Template Function
    Template Function Errors
    Securing Cookies from Tampering
    Cookie Exercises
    Section 14: Sessions
    Random Strings with crypto/rand
    Exploring math/rand
    Wrapping the crypto/rand package
    Why Do We Use 32 Bytes for Session Tokens?
    Defining the Sessions Table
    Stubbing the SessionService
    Sessions in the Users Controller
    Cookie Helper Functions
    Create Session Tokens
    Refactor the rand Package
    Hash Session Tokens
    Insert Sessions into the Database
    Update Existing Sessions
    Query Users via Session Token
    Deleting Session
    Sign Out Handler
    Sign Out Link
    Session Exercises
    Section 15: Improved SQL
    SQL Relationships
    Foreign Keys
    On Delete Cascade
    Inner Join
    Left, Right, and Full Outer Join
    Using Join in the SessionService
    SQL Indexes
    Creating PostgreSQL Indexes
    On Conflict
    Section 16: Schema Migrations
    What are Schema Migrations?
    How Migration Tools Work
    Installing pressly/goose
    Converting to Schema Migrations
    Schema Versioning Problem
    Run Goose with Go
    Embedding Migrations
    Migration Tools
    Go Migration Files
    Removing Old SQL Files
    Section 17: Managing Go Tools
    Using Go to Manage Tool Versions
    Installing Go Tools
    Section 18: Completing the Authentication System
    Logging Out
    Sending Emails
    Welcome Email
    Password Reset Tokens
    Password Reset Email
    Password Reset HTML Form
    Password Reset Handler
    Section 19: Middleware & Context
    Middleware Recap
    Context and Context Values
    Setting Context Values Safely
    User Context Value
    Set User Middleware
    Require User Middleware
    Section 20: Rendering Alerts
    Designing an Alert Banner
    Rendering Dynamic Errors
    Hiding the Alert Banner
    Alert Template Function
    Rendering Signup Errors
    Public vs Internal Errors
    Rendering Login Errors
    Redirecting with Alerts
    Section 21: Galleries
    Section Overview
    The Gallery Model
    Gallery Service
    Sharing a DB Connection
    Implementing the GalleryService
    Initial Galleries Handler
    Create Gallery Endpoint
    Validators and Normalizers
    Edit Galleries Endpoint
    Update Galleries Endpoint
    Show Gallery Endpoint
    Delete Gallery Endpoint
    Gallery Index Endpoint
    Navbar Updates
    Section 22: Images
    File Upload HTML Form
    ParseMultipartForm
    Parsing Image Uploads
    The Image Service
    Query Images via Gallery ID
    Rendering Images
    Deleting Images
    Section 23: Preparing for Production
    Error Cleanup
    Serving Static Assets
    CSRF Proction
    Config Variables
    Loading a JSON Config
    Section 24: Deploying
    Setting Up a Server
    Installing Postgres on the Server
    Caddy Server
    Deployment Script
    Section 25: [BONUS] OAuth
    Intro to OAuth
    Go's OAuth2 Package
    Setting up a Dropbox app
    Dropbox OAuth Spike (Part 1)
    Dropbox OAuth Spike (Part 2)
    Examining an OAuth Token
    OAuth Model
    Persisting OAuth Tokens
    Refactor
    Generic OAuth Handler
    Section 26: [BONUS] Dropbox
    Dropbox SDK
    Custom Dropbox Package
    Dropbox Chooser Intro
    Images via Dropbox Chooser
    Section 27: [BONUS] Improved Forms
    Persisting User Data
    Rendering Errors by Each Form Field
    Using a Library for Form Rendering

    Additional Resources

    Extra Goodies Included with the Complete Package

    700+ Page eBook

    In addition to the screencasts, the course has an eBook that covers everything except for the bonus content. If you prefer reading, want to see a slightly different take on a lesson, or need something more travel-friendly the book will be your best friend. Available in PDF, EPUB, and MOBI (Kindle) formats.

    The updated course's eBook is currently only available as HTML pages at this time as it is constantly changing as new lessons are released, but it will be available as PDF, EPUB, and MOBI when the update is finished.

    All the Source Code

    Get access to all of the source code used in the course from start to finish. You can easily jump to code just before or after each lesson, making it easier to jump to a specific section and continue learning.

    Students-only Slack

    Worried about getting stuck? Don't be! The course includes access to a private Slack where you can chat with myself and other students. Ask questions, get help with a bug, or even discuss ways to go beyond the course materials. Many students have found this as valuable as the course itself for continuing their education.

    30 Day Development Plan

    For many developers, the idea of building a large system can be daunting. The 30 day development plan helps guide you through breaking the process of up into actionable steps that aren't overwhelming and gradually build upon one another leading to a complete web application. While it may take longer than 30 days to build some applictions, the process of breaking it into steps will be useful for any project.

    The best course I've seen around! This course stands out since it's more than just code snippets you'll find on other sites. It's a full blown, project-based course that guides you from start to finish. The background explanations for all the components and taking one approach over another are really helpful too.

    Chris Rivera

    Not interested in screencasts?

    Check out the packages below.

    Book + Bonus Package

    This package doesn't include screencasts for the entire course, but it does include the bonus content covering advanced API usage with OAuth and Dropbox. You'll also get the 700+ page ebook, access to the course slack, and all the source code.

    Pay once, own it forever

    $49.50 $99

    Save 50% until Nov 29

    Book Only Package

    If your budget is preventing you from purchasing the bonus content and screencasts, I recommend this package. It teaches everything necessary to build web applications and will be a resource you reference for years to come.

    Pay once, own it forever

    $24.50 $49

    Save 50% until Nov 29

    This course has taught me so much in only 5 days! If you are even a little interested in Web Development I would definitely check it out!👍

    Kayla Thomsen

    Frequently asked questions

    Can’t find the answer you’re looking for? Email me: jon@calhoun.io.

    Do you update the course?
    Yep! Not only do I make updates to keep the code in the course from breaking, I also actively take student feedback to improve the course. This is what lead to a recent re-recording of the entire course.
    Anyone who purchases will have access to all future updates.
    When was the course last updated?
    Nov, 2022 using Go 1.19. You can read more here.
    Anyone who purchases the course will have access to both the original course and the updated version.
    Can I get a sample?
    Yep. Fill out this form and I'll send you 14 screencasts from the course. I'll also include an eBook sample.
    What is your money back guarantee?
    If you buy the course and aren't happy, email me within 30 days of purchasing and I'll issue you a refund.
    The only exception is obvious fraud. For instance, when someone buys the course, downloads every piece of content, then immediately asks for a refund all within a couple hours. I do everything in my power to let honest customers try out the course, but I reserve the right to deny a refund if it appears to be blatant fraud.
    If you are concerned, reach out to me and I can help answer any specific questions. I want you to be able to give the course an honest try and I am pretty easy to work with.
    How much programming experience do I need?
    Web Development with Go is designed to be approachable for both absolute beginners and professional developers alike. Each lesson explains the code in detail, and there are often additional resources to check out if you want further reading. The only real requirement is that you know (or learn) some basic Go syntax.
    Check out the samples and you will see how approachable this course is.
    Do you offer team packages?
    Yes, I do. Reach out and let me know how many developers you need access for so I can get you a custom discount.
    How long will I have access?
    The course doesn't expire. Once you purchase, you will always have access.
    If you are worried, both the screencasts and the ebook can be downloaded and backed up on your own devices. You know, just in case I get hit by a truck or something. 🚛 *beep* *beep*
    Why does the course cost so much?
    Unfortunately this course doesn't cost $10. I know that many courses on Udemy go on sale frequently for $10, so why isn't this one of those courses?
    The short answer is that charging more enables me to provide a better experience for students. It enables me to provide awesome support, free updates, and to make sure the course covers everything you need to learn to become a web developer. It also allows me to create free resources that you have likely already benefited from (like Gophercises).
    If you are on the fence, ask someone who has taken the course if it is worth the price. Over 4000 people have happily used this course to learn how to build web application using Go. If you join them, I promise you won't regret it.
    If you are on the fence I offer two cheaper packages that include a vast mority of the course content at a much cheaper price. You can upgrade later, and I offer a money back guarantee.
    Do you offer student discounts?
    Yes, but only on the Complete Package and not during my annual Black Friday sale.
    Can I upgrade later?
    Yes. Email me when you are ready to upgrade and let me know the email address you used to purchase the course.
    What formats are the videos in?
    The videos are hosted with Vimeo and are streamable through their embedded player. I also offer DRM-free, high quality 1920x1080 mp4s that you can download.
    At some point in the future I plan to change video hosts and use Mux instead to help out customers in countries where Vimeo is banned, but those updates are not released yet.

    Jon's course, Web Development with Go, is amazing. It is filled with great insights and has been an amazing resource of knowledge.

    Invest in yourself by buying this book along with the extras. You won’t regret it.

    Georges Mantzos

    About me

    Meet the fella behind the camera

    Jon Calhoun is a full stack web developer who teaches about Go,web development, testing, algorithms, and anything else he finds interesting. He spoke at the GothamGo conference about focusing on simplicity when writing software and is a panelist on the Go Time podcast.

    Previously, Jon founded EasyPost, a shipping API that many fortune 500 companies use to power their shipping infrastructure. Before that he worked at Google as a software engineer. Prior to that he studied computer science at UCF.

    You can find more of Jon's work, including other FREE courses and tutorials he has created, below.

    Jon's Courses

    • Work through programming exercises designed to teach you various aspects of programming in Go.

    • Dive into various programming algorithms and data structures, learning how to implement each in Go.

    • Learn to build real, complex web applications from start to finish using Go.

    • Learn all about testing techniques and how to apply them to real projects. A great follow-up to Web Development with Go!

    • Calhoun.io FREE

      Not a course, but I also write a bunch of Go tutorials that are available free on my website.

    Amigo. Your course KICKS ASS! Your code is clear, your delivery is clear, and I just did a few of the algorithm tutorials on your site and they too are clearly explained. Thank you!!!

    Great JOB!

    Angel Rosario

    People sometimes tweet about me

    Hopefully they don't say mean things 😬