GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — go-workshop/Step02.md at master · a5i/go-workshop

Expand file tree

/

Step02.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
29 lines (21 loc) · 355 Bytes
/

Step02.md

Copy path

File metadata and controls

29 lines (21 loc) · 355 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Step 2. Add the server code

Create the main.go

cmd/main.go

package main

import (
	"net/http"
	
	"github.com/labstack/echo"
)

func main() {
	e := echo.New()
	e.GET("/", func(c echo.Context) error {
		return c.String(http.StatusOK, "RealWorld!")
	})
	e.Logger.Fatal(e.Start(":3333"))
}

Run

go run cmd/main.go
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.