Skip to content

dsypasit/httpong

Repository files navigation

httpong: simple http library

I made it for learning how http framework work. I know my codebase was a bit weird but i think i learn a lot from this project. I learned about TDD and how http work at the TCP layer (a little bit :))

Example

package main

import (
	"fmt"

	"github.com/Dsypasit/httpong"
)

func main() {
	config := httpong.Config{
		Addr: ":8080",
	}
	app := httpong.NewWithConfig(config)

	app.GET("/", func(ctx *httpong.Context) error {
		return ctx.Send(200, "hello world")
	})

	err := app.Run()
	if err != nil {
		fmt.Printf("failed to run: %v", err)
	}
}

Goal

  • implement cookie
  • make middleware
  • more...

Inspiration

About

make http framework for learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages