fume

package module
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 1

README

Fume adapter for Gin

Go Reference GoCard

This is a simple adapter for Gin that allows you to deploy your application using Fume.

package main

import (
	fume "github.com/fumeapp/gin"
	"github.com/gin-gonic/gin"
)


func main() {
	routes := gin.New()
	routes.GET("/", func(c *gin.Context) { c.JSON(200, gin.H{"message": "Hello World"}) })
	fume.Start(routes, fume.Options{})
}

Options

Option Description Default
Port Port to listen on 8080
Host Host to listen on localhost

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(routes *gin.Engine, options Options)

Types

type Options

type Options struct {
	// optional - hostname to listen on (default: localhost)
	Host string
	// optional - port to run on (default: 8080)
	Port int
}

Jump to

Keyboard shortcuts

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