title | keywords | description | |||
---|---|---|---|---|---|
Hello World |
|
A simple "Hello, World!" application. |
This project demonstrates a simple "Hello, World!" application using the Fiber framework in Go.
Ensure you have the following installed:
- Golang
- Fiber package
-
Clone the repository:
git clone https://github.com/gofiber/recipes.git cd recipes/hello-world
-
Install dependencies:
go get
-
Start the application:
go run main.go
-
Access the application at
http://localhost:3000
.
Here is an example main.go
file for the Fiber application:
package main
import (
"log"
"github.com/gofiber/fiber/v2"
)
func main() {
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Hello, World!")
})
log.Fatal(app.Listen(":3000"))
}