Code Monkey home page Code Monkey logo

This is a web framework that firmly believes in dreams.

Firmeve = Firm + Believe

Be firm in your will and believe in your ideals.

Those who have achieved nothing can always tell you that you can't make a big deal. If you have an ideal, you have to defend it.

Build Status codecov GitHub license Go Report Card

Quick start

go get -u github.com/firmeve/firmeve@develop

base

Docs

https://docs.firmeve.com/v/develop/

Example

package main

import (
    "fmt"
    "github.com/firmeve/firmeve"
    "github.com/firmeve/firmeve/http"
    "github.com/firmeve/firmeve/kernel/contract"
    "github.com/firmeve/firmeve/render"
)

func main() {
    firmeve.RunWithSupportFunc(
        application,
        firmeve.WithConfigPath("./config.yaml"),
        firmeve.WithProviders([]contract.Provider{
            new(http.Provider),
        }),
        firmeve.WithCommands([]contract.Command{
            new(http.HttpCommand),
        }),
    )
}

func application(application contract.Application) {
    router := application.Resolve(`http.router`).(contract.HttpRouter)
    router.GET("/", func(c contract.Context) {
        fmt.Printf("%t", c.Firmeve() == firmeve.Application)
        c.RenderWith(200, render.JSON, map[string]string{
            "ctx_application":    fmt.Sprintf("%p", c.Firmeve()),
            "global_application": fmt.Sprintf("%p", firmeve.Application),
        })

        c.Next()
    })

    v1 := router.Group("/api/v1")
    {
        v1.GET(`/ping`, func(c contract.Context) {
            c.RenderWith(200, render.JSON, map[string]string{
                "message": "pong",
            })
            c.Next()
        })
    }
}

Bootstrap command

go run main.go http:serve

Feature list

firmeve's Projects

bibigpt icon bibigpt

BibiGPT · 音视频内容一键总结:哔哩哔哩丨YouTube丨播客丨会议丨本地文件等 (原 BiliGPT 省流神器 & 课代表)

ddia icon ddia

《Designing Data-Intensive Application》DDIA中文翻译

firmeve icon firmeve

a out-of-the-box, full-featured go framework supporting http, http2, websocket, tcp, udp, rpc and microservice

go-micro icon go-micro

A framework for distributed systems development

issue icon issue

About firmeve knowledge and collect relation issue

micro icon micro

API first development platform

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.