Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - gdwrd/banjo: BANjO is a simple web framework written in Go (golang)

BANjO is a simple web framework written in Go (golang) - gdwrd/banjo

Visit SiteGitHub - gdwrd/banjo: BANjO is a simple web framework written in Go (golang)

GitHub - gdwrd/banjo: BANjO is a simple web framework written in Go (golang)

BANjO is a simple web framework written in Go (golang) - gdwrd/banjo

Powered by 0x5a.live ๐Ÿ’—

BANjO

Build Status Software License GoDoc Coverage Status Go Report Card

banjo it's a simple web framework for building simple web applications

Install

$ go get github.com/nsheremet/banjo

Example Usage

Simple Web App - main.go

package main

import "banjo"

func main() {
  app := banjo.Create(banjo.DefaultConfig())
  
  app.Get("/", func(ctx *banjo.Context) {
    ctx.JSON(banjo.M{"foo":"bar"})
  })

  app.Run()
}

Example responses:

// ... Redirect To
  app.Get("/admin", func(ctx *banjo.Context) {
    ctx.RedirectTo("/")
  })
// ... HTML
  app.Get("/foo", func(ctx *banjo.Context) {
    ctx.HTML("<h1>Hello from BONjO!</h1>")
  })
// ... Return Params as JSON
  app.Post("/bar", func(ctx *banjo.Context) {
    ctx.JSON(banjo.M{
      "params": ctx.Request.Params
    })
    ctx.Response.Status = 201
  })

License

banjo is primarily distributed under the terms of Mozilla Public License 2.0.

See LICENSE for details.

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.