Skip to main content
The web template creates a full-stack web application with server-rendered HTML. Unlike single-page apps (SPAs) where JavaScript renders the page in the browser, server-rendered apps generate complete HTML on the server. This is great for SEO, fast initial loads, and simpler architecture. You write templates that combine HTML with your data, and the server sends the finished page to the browser.

When to Use This Template

Use the web template when:
  • Building a website - Server-rendered HTML pages
  • Need layouts - Shared headers, footers, navigation
  • Static assets - CSS, JavaScript, images
  • SEO matters - Search engine friendly HTML

What You Get

  • View engine - Template rendering with layouts
  • Static file serving - Embedded or file-based assets
  • Page handlers - Clean separation of routes and views
  • Component system - Reusable UI pieces

Quick Start

Open http://localhost:8080 in your browser.

Project Structure

Key Features

View Engine

Renders HTML templates with data:

Layouts

Wrap pages in a consistent layout:

Static Assets

Serve CSS, JS, and images:
Assets are embedded in the binary for easy deployment.

Handlers

Views

Next Steps

Project Structure

Understand every file

Tutorial

Build a website step by step