v0.5.7 beta
Back-end UI Framework

for feature-rich, secure, and fast web apps in Go

Tutorial

Initialize the Project

1. Prepare the system

  • Ensure your Go is at least 1.24.1; you can check in the terminal by running:
  go version
  • Install the templ CLI tool.
  • Optional: install wgo for “live” reload

2. Initialize the Go project and add doors

  1. Initialize a new project.
mkdir project
cd project
go mod init github.com/derstruct/project # address of your repo (actually can be anything)

You can find the code from this tutorial here https://github.com/derstruct/doors-tutorial. Branch name ~= part name.

  1. Get the doors dependency
go get github.com/doors-dev/doors

3. Hello World

Create ./main.go

package main

func main() {
  println("hello world")
}

Run:

$ go run .
hello world

Next: Home Page