gin

command
v0.0.0-...-26b160e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

README

Gin API Example

This is an example of how to serve an API using gin

Getting Started

Run the Micro API
$ micro api --handler=http
Run the Greeter Service
$ go run greeter/server/main.go

### Run the Greeter API

$ go run gin.go
Listening on [::]:64738
Curl the API

Test the index

curl http://localhost:8080/greeter
{
  "message": "Hi, this is the Greeter API"
}

Test a resource

 curl http://localhost:8080/greeter/asim
{
  "msg": "Hello asim"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:
@Time : 2018/8/21 11:19 @Author : kenny zhu @File : examples.go @Software: GoLand @Others: @Time : 2018/8/21 11:04 @Author : kenny zhu @File : init.go @Software: GoLand @Others: @Time : 2018/8/21 11:05 @Author : kenny zhu @File : modules.go @Software: GoLand @Others:

Jump to

Keyboard shortcuts

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