All Projects → godzillaframework → godzilla

godzillaframework / godzilla

Licence: Apache-2.0 license
a powerful go web framework

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to godzilla

webfr
moved to: https://github.com/godzillaframework/godzilla.git
Stars: ✭ 13 (-40.91%)
Mutual labels:  unix, webframework, go-library, go-framework
BindToInterface
With this program you can bind applications to a specific network interface / network adapter. This is very useful if you have multiple (internet) connections and want your program to use a specific one.
Stars: ✭ 67 (+204.55%)
Mutual labels:  unix
hostname
Cross-platform hostname functions in Rust
Stars: ✭ 48 (+118.18%)
Mutual labels:  unix
dotfiles
My personal configuration and bootstrap files
Stars: ✭ 14 (-36.36%)
Mutual labels:  unix
useful-unix-stuff
a collection of useful unix commands/scripts/etc.
Stars: ✭ 64 (+190.91%)
Mutual labels:  unix
rTerm
Fake UNIX terminal for personal pages
Stars: ✭ 19 (-13.64%)
Mutual labels:  unix
dotfiles
Command-line lovers unite! I'm sharing my dotfiles, so you don't have to be me and spend years tweaking configuration files for the best developer experience. Enjoy!
Stars: ✭ 38 (+72.73%)
Mutual labels:  unix
pidp11-2.11bsd
Using the historical unix 2.11 BSD operating system on the PiDP-11. With examples such as cool-retro-weatherstation.
Stars: ✭ 57 (+159.09%)
Mutual labels:  unix
googletrans
G文⚡️: Concurrency-safe, Free and Unlimited google translate api for Golang. 🔥免费、无限、并发安全的谷歌翻译包
Stars: ✭ 94 (+327.27%)
Mutual labels:  go-library
nim-servy
Servy is a fast, simple and lightweight micro web-framework for Nim
Stars: ✭ 30 (+36.36%)
Mutual labels:  webframework
kotoriotoko
KOTORIOTOKO (little bird man) -- Extremely Compatible and Sustainable Twitter Application Written in Shell Script
Stars: ✭ 89 (+304.55%)
Mutual labels:  unix
yaf
Yet another system fetch that is minimal and customizable
Stars: ✭ 23 (+4.55%)
Mutual labels:  unix
colocat
Fegeya Colocat, Colorized 'cat' implementation. Written in C++17.
Stars: ✭ 14 (-36.36%)
Mutual labels:  unix
dotfiles
My collection of dotfiles
Stars: ✭ 77 (+250%)
Mutual labels:  unix
venomlinux.org
Source Based Linux Distribution
Stars: ✭ 17 (-22.73%)
Mutual labels:  unix
TermGL
2D & 3D graphics engine in the terminal [C/C++]
Stars: ✭ 219 (+895.45%)
Mutual labels:  unix
ft select
A robust file browser and manager in the terminal.
Stars: ✭ 14 (-36.36%)
Mutual labels:  unix
Ob3vil1on
Another archive cracker created in python | cracking [zip/7z/rar] by bruteforcing [ NOT MAINTAINED ]
Stars: ✭ 17 (-22.73%)
Mutual labels:  unix
tsukuyomi
Asynchronous Web framework for Rust
Stars: ✭ 81 (+268.18%)
Mutual labels:  webframework
luadch
ADC Hub Server
Stars: ✭ 46 (+109.09%)
Mutual labels:  unix

godzilla

forthebadge

About:

  • A powerfull go web framework
  • Fast 🚀
  • Secure 🔒
  • Easy Peasy :)

Features:

  • Log Middleware

Installation:

go get -u github.com/godzillaframework/godzilla

Examples:

  • a simple api
package main

import "github.com/godzillaframework/godzilla"

func main() {
	gz := godzilla.New()

	gz.Get("/index", func(ctx godzilla.Context) {
		ctx.SendString("Hello EveryOne!!!")
	})

	gz.Start(":9090")
}
  • params
package main

import "github.com/godzillaframework/godzilla"

func main() {
    gz := godzilla.New()

    gz.Get("/users/:user", func(ctx godzilla.Context) {
        ctx.SendString(ctx.Param("user"))
    })

    gz.Start(":8080")
}
  • static files
package main

import "github.com/godzillaframework/godzilla"

func main() {
    gz := godzilla.New()

    gz.Static("/imgs", "./images")

    /* go to localhost:8080/imgs/image.png */

    gz.Start(":8080")
}

middleware:

  • Log middleware:
package main

import (
	"log"

	"github.com/godzillaframework/godzilla"
)

func main() {
	gz := godzilla.New()
	
	logMiddleware := func(ctx godzilla.Context) {
		log.Printf("log message!")

		ctx.Next()
	}
	
	gz.Use(logMiddleware)
	
	gz.Start(":8080")
  • Unauthorized middleware:
package main

import (
	"log"

	"github.com/godzillaframework/godzilla"
)

func main() {

	gz := godzilla.New()

	unAuthorizedMiddleware := func(ctx godzilla.Context) {
		ctx.Status(godzilla.StatusUnauthorized).SendString("You are unauthorized to access this page!")
	}

	gz.Get("/hello", func(ctx godzilla.Context) {
		ctx.SendString("Hello World!")
	})

	gz.Get("/protected", unAuthorizedMiddleware, func(ctx godzilla.Context) {
		ctx.SendString("You accessed a protected page")
	})


	gz.Start(":8080")
}
  • example app

  • for more tutorials visit the docs

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].