cd c:\celfinet\machp
go mod tidy
mysql -hlocalhost -P3306 -uroot -ppandora -e"source 0_machp_user.sql;"
mysql -hlocalhost -P3306 -umachp -pmachp123 machp_dev -e"source 1_machp_schema.sql;"
go test
go test --coverprofile=cover.out
go tool cover --html=cover.out
go run .\server.go
curl -X POST -H "Content-Type: application/json" -d "{"name":"tom"}" localhost:1323/tenant
curl localhost:1323/tenant/2
curl -X PUT -H "Content-Type: application/json" -d "{"id":2, "name":"jerry"}" localhost:1323/tenant/2
curl -X POST -F files=@c:\tmp\1.txt -F files=@c:\tmp\2.txt localhost:1323/tenant/jerry/upload
curl -X DELETE localhost:1323/tenant/1
docker build -f Dockerfile . -t machp
docker run -d -p 8080:1323 --name machp-dev machp
curl -X GET localhost:8080/tenant/1
$env:MACHP_PORT=1326 go run .\server.go
$env:MACHP_DB_DRIVER="mysql" $env:MACHP_DB_DATA_SOURCE="machp:machp123@tcp(localhost:3306)/machp_dev" go run .\server.go
MACHP_DB_DRIVER MACHP_DB_DATA_SOURCE MACHP_MQ_URL MACHP_HOST MACHP_PORT MACHP_HOME
docker pull rabbitmq
docker run -d --hostname my-rabbit --name my-rabbitmq -p "5672:5672" rabbitmq
docker start my-rabbitmq