Giter VIP home page Giter VIP logo

Flamego Flamego

GitHub Workflow Status Codecov GoDoc Sourcegraph

Flamego is a fantastic modular Go web framework with a slim core but limitless extensibility.

It is the successor of the Macaron, and equips the most powerful routing syntax among all web frameworks within the Go ecosystem.

Installation

The minimum requirement of Go is 1.19.

go get github.com/flamego/flamego

Getting started

package main

import "github.com/flamego/flamego"

func main() {
	f := flamego.Classic()
	f.Get("/", func() string {
		return "Hello, Flamego!"
	})
	f.Run()
}

Features

Middleware

  • Logger - Log requests and response status code
  • Recovery - Automatic recovery from panics
  • Static - Serve static files
  • Renderer - Render content
  • template - Go template rendering
  • session - User session management
  • recaptcha - Google reCAPTCHA verification
  • csrf - Generate and validate CSRF tokens
  • cors - Cross-Origin Resource Sharing
  • binding - Request data binding and validation
  • gzip - Gzip compression to responses
  • cache - Cache management
  • brotli - Brotli compression to responses
  • auth - Basic and bearer authentication
  • i18n - Internationalization and localization
  • captcha - Captcha service
  • hcaptcha - hCaptcha verification

Getting help

Users and projects

  • Cardinal: Attack-defence CTF platform.
  • mebeats: Realtime heartbeat monitor service based on Mi band.
  • ASoulDocs: Ellien's documentation server.
  • NekoBox: Anonymous question box.
  • Codenotify.run: Codenotify as a Service.
  • Relay: A web server for forwarding events from service A to service B.
  • bilibili-lottery: 一款支持对哔哩哔哩视频或动态评论进行抽奖的小程序
  • pgrok: Poor man's ngrok.
  • Caramelverse: A fashion brand.
  • Sourcegraph Accounts: Centralized accounts system for all of the Sourcegraph-operated services
  • Just send a PR to add yours!

Development

Install "go-mockgen" and "goimports" to re-generate mocks:

go install github.com/derision-test/go-mockgen/cmd/go-mockgen@latest
go install golang.org/x/tools/cmd/goimports@latest

go generate ./...

License

This project is under the MIT License. See the LICENSE file for the full license text.

Flamego's Projects

auth icon auth

Package auth is a middleware that provides request authentication for Flamego

binding icon binding

Package binding is a middleware that provides request data binding and validation for Flamego

brotli icon brotli

Package brotli is a middleware that provides brotli compression to responses for Flamego

cache icon cache

Package cache is a middleware that provides the cache management for Flamego

captcha icon captcha

Package captcha is a middleware that provides captcha service for Flamego

cors icon cors

Package cors is a middleware that provides the Cross-Origin Resource Sharing for Flamego

csrf icon csrf

Package csrf is a middleware that generates and validates CSRF tokens for Flamego

flamego icon flamego

A fantastic modular Go web framework with a slim core but limitless extensibility

gzip icon gzip

Package gzip is a middleware that provides gzip compression to responses for Flamego

hcaptcha icon hcaptcha

Package hcaptcha is a middleware that provides hCaptcha integration for Flamego

i18n icon i18n

Package i18n is a middleware that provides internationalization and localization for Flamego

recaptcha icon recaptcha

Package recaptcha is a middleware that provides reCAPTCHA integration for Flamego

seed icon seed

The seed repository for your Flamego middleware modules

session icon session

Package session is a middleware that provides the session management for Flamego

sse icon sse

Package sse is a middleware that provides Server-Sent Events for Flamego

template icon template

Package template is a middleware that provides Go template rendering for Flamego

validator icon validator

💯 Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.