Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Go Programming: Build REST APIs with PostgreSQL & Next.js
New
Rating: 2.0 out of 5(2 ratings)
6 students

Go Programming: Build REST APIs with PostgreSQL & Next.js

Course subtitle Learn Golang from scratch: build REST APIs, PostgreSQL databases, session authentication, and a Next.js
Last updated 11/2026
English

What you'll learn

  • Write Go programs using variables, functions, structs, pointers, slices, maps, and error handling.
  • Build REST APIs with Go’s standard library, including routes, JSON requests, and HTTP responses.
  • Connect Go to PostgreSQL with Neon and pgx, and build CRUD endpoints with ownership checks.
  • Implement registration, login, password hashing, session cookies, and protected API routes.
  • Manage post drafts and publishing, and configure CORS for frontend integration.
  • Connect a Next.js frontend using Server Components, Server Actions, Tailwind CSS, and shadcn/ui.

Course content

6 sections • 48 lectures • 7h 47m total length
  • Welcome to Go: What You’ll Learn In This Section1:42

    Understand the course structure and the application we’ll build.

  • Installing Go & Setting Up Your Environment4:42

    Install Go, check the installation, and prepare your editor.

  • Write & Run Your First Go Program9:04

    Create a Go module, understand package main, and run a program.

  • Variables, Constants, Types & Zero Values10:57

    Declare variables and constants, choose types, and understand default values.

  • Making Decisions & Repeating Work7:50
  • Arrays, Slices, Maps & Range17:59

    Store collections of data, access their values, and iterate with range.

  • Functions, Return Values & Error Handling13:30

    Write reusable functions, return multiple values, and handle errors.

  • Organizing Data with Structs5:38

    Define custom types that group related information into named fields.

  • Understanding Pointers & Methods12:23

    Use pointers to access and change values, and attach methods to types.

Requirements

  • No prior Go experience required. We start with installation and the fundamentals.
  • Basic programming knowledge is helpful for following the practical examples.
  • A Windows, macOS, or Linux computer with internet access and permission to install software.

Description

Learn Go by building an application step by step—from your first program to an authenticated REST API connected to a Next.js frontend.

This course starts with the fundamentals and introduces new concepts as we need them. You’ll write the code, understand what it does, and test the application as it grows.

We begin by installing Go and preparing your development environment. You’ll learn variables, constants, types, conditions, loops, arrays, slices, maps, functions, and error handling. We’ll then explore structs, pointers, and methods so you can organize data and understand the code behind our API.

Next, you’ll build an HTTP server using Go’s standard library. You’ll register routes, handle incoming requests, decode JSON, validate input, and return responses with appropriate HTTP status codes.

You’ll connect the application to PostgreSQL using Neon and pgx, create related database tables, and keep configuration outside your source code using environment variables.

Authentication comes next. Together, we’ll implement registration, password hashing with bcrypt, login, session storage, HttpOnly cookies, protected routes, and logout. You’ll see how the application identifies a logged-in user and controls access to their data.

With authentication in place, you’ll build a blog REST API with post creation, listing, updates, deletion, drafts, and publishing. Ownership checks will ensure that users can modify only their own posts.

Finally, you’ll implement CORS middleware and build a focused Next.js frontend using TypeScript, Tailwind CSS, and shadcn/ui. Server Components and Server Actions will connect the interface to your Go backend, including login, logout, and protected post creation.

By the end, you’ll have practical experience building a Go backend, working with PostgreSQL, implementing session authentication, and connecting an API to a frontend.

Basic programming knowledge is helpful. No prior Go experience is required, and basic React knowledge is recommended for the Next.js section

Who this course is for:

  • Developers new to Go who want to learn the fundamentals through a practical project.
  • Frontend developers who want to build their own backend APIs with Go and PostgreSQL.
  • JavaScript, TypeScript, or other language developers looking to learn Go.
  • Developers who want hands-on experience with authentication, session cookies, and protected REST APIs.
  • - React and Next.js developers who want to connect a frontend to a Go backend.