Skip to content

yang-Ann/go_echo_serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

启动

# 下载依赖
go mod tidy

cd main

# 启动服务(默认监听8100)
go run .

# 指定服务的端口
go run . -port=8200

#------------------- 使用 fresh 启动(文件更新自动重启服务)
# 安装 fresh
go install github.com/pilu/fresh

# 启动
fresh

使用

curl localhost:8100 -G -d name=zhangsan -d age=18

echo hello > data.txt
curl -F [email protected] -F age=18 localhost:8100

打包

cd main

go build

# 启动服务(默认监听8100)
.\main.exe

# 指定服务的端口
.\main.exe -port=8200

About

A simple echo service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages