fasthttp

package module
v0.0.0-...-7e4985f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2022 License: MIT Imports: 10 Imported by: 0

README

PRs Welcome

Go-Mojito is a super-modular library to bootstrap your next Go web project. It can be used for strict API-only purposes as well as server-side rendering.

Icon made with Gopherize and flaticon.


⚡️ Quickstart

package main

import (
	"github.com/infinytum/go-mojito"
	"github.com/infinytum/go-mojito-fasthttp"
)

func main() {
	// Register fasthttp as the default router.
	fasthttp.AsDefault()

	// Create your first route
	mojito.GET("/", func(req mojito.Request, res mojito.Response) error {
		res.String("Hello, World!")
		return nil
	})

	// ListenAndServe the router
	mojito.ListenAndServe(":8080")
}

🤖 Benchmarks

TODO

⚙️ Installation

  • Make sure you have Go 1.18 or higher installed.
  • Create a new folder and initialize your project with go mod init github.com/your/project.
  • Install go-mojito with go get -u github.com/infinytum/go-mojito.
  • Install go-mojito-fasthttp go get -u github.com/infinytum/go-mojito-fasthttp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As

func As(name string)

As registers this router under a given name

func AsDefault

func AsDefault()

AsDefault registers this router as the default router

func NewFastHttpRouter

func NewFastHttpRouter() mojito.Router

NewFastHttpRouter will create new instance of the mojito fasthttp router implementation

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL