Fiber Golang webdev tutorial serving SendString tutorial # 1
Fiber Golang webdev tutorial serving SendString tutorial # 1
// let create our first project in fiber/Golang package main import "github.com/gofiber/fiber/v2" func main() { // create new router/server app := fiber.New() // install fiber first // lets create our first route app.Get("/", func(c *fiber.Ctx) error { // lets send string to users return c.SendString("Hello world!") }) // lets speficiy port to run our serve app.Listen(":8080") // our server is complete. // lets run it.. // only 3 lines of code }