Skip to content

Boofny/golive

Repository files navigation

GoLive!

Fast web frame work for golang built on std lib http

Installation

Get started by downloading this module

Need Golang 1.25.1+

go get github.com/Boofny/golive@latest

Simple Example

package main

import (
	"net/http"
	"github.com/Boofny/golive"
	"github.com/Boofny/golive/middleware"
)

func main() {
	e := golive.Launch()

	e.Chain(middleware.CORS())

	e.GET("/ping", func(c *golive.Context)error{
		return c.SendSTRING(http.StatusOK, "pong") //send out your data
	})

	e.StartServer(":8080")
}

Try it out!

In the terminal try.

curl -X GET localhost:8080/hello

Or in your browser

http://localhost:8080/hello

Check out the docker image

Docker hub

Or docker one liner for a quick demo

docker run -p 8000:8000 -e PORT=8000 boofny/golive-docker

About

Simple and fast golang http framework

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages