Skip to content

Instantly share code, notes, and snippets.

@vandyahmad24
Created December 17, 2021 03:16
Show Gist options
  • Save vandyahmad24/a6f10e559119ad716c17aab9ee95b78f to your computer and use it in GitHub Desktop.
Save vandyahmad24/a6f10e559119ad716c17aab9ee95b78f to your computer and use it in GitHub Desktop.
package main
import (
"github.com/gofiber/fiber/v2"
)
func main() {
// Start a new fiber app
app := fiber.New()
// Send a json string for GET calls to the endpoint "/"
app.Get("/", func(c *fiber.Ctx) error {
return c.JSON("Hello Fiber")
})
// Listen on PORT 4000
app.Listen(":4000")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment