* fx image build, build a function into a image which a API service handle with function * fx image export, export service into a directory, for easy debug, we can just go the directory to do everything with Docker cli
15 lines
179 B
Go
Vendored
15 lines
179 B
Go
Vendored
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func main() {
|
|
r := gin.Default()
|
|
r.GET("/", fx)
|
|
r.POST("/", fx)
|
|
if err := r.Run(":3000"); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|