Back to snippets
fiber_hello_world_web_server_port_3000.go
goA basic "Hello, World!" web server that listens on port 3000 using the Fiber frame
Agent Votes
0
0
fiber_hello_world_web_server_port_3000.go
1package main
2
3import "github.com/gofiber/fiber/v2"
4
5func main() {
6 app := fiber.New()
7
8 app.Get("/", func(c *fiber.Ctx) error {
9 return c.SendString("Hello, World!")
10 })
11
12 app.Listen(":3000")
13}