@ -17,4 +17,4 @@
builder
logs
static
@ -34,4 +34,4 @@ ps:
-@ps -ef | grep ./builder/idata | grep -v grep
push:
-@scp builder/* root@119.29.105.154:/root/idata/builder/
-@scp builder/* root@119.29.105.154:/root/idata/bin/
@ -30,7 +30,7 @@ import (
const appName = "idata"
func main() {
rand.Seed(time.Now().Unix())
rand.Seed(time.Now().UnixNano())
ctx, wait := flags.Parse(appName)
defer wait()
@ -37,9 +37,10 @@ func Registry(engine *gin.Engine) {
apiR.GET("/soup", soup.GetRandSoup)
apiR.GET("/almanac", almanac.Almanac)
apiR.GET("/dirty_word", dirty.IsDirtyWord)
apiR.Static("/video", "./static/")
}
func myIp(ctx *gin.Context) {
addr := ctx.Request.RemoteAddr
addr := ctx.ClientIP()
ctx.String(http.StatusOK, addr)