Skip to content

Latest commit

 

History

History
68 lines (42 loc) · 1.01 KB

README.md

File metadata and controls

68 lines (42 loc) · 1.01 KB

Gomoku

⚪️⚫️⚪️⚫️

Development

Get it

GO111MODULE=off go get -u github.com/gogogomoku/gomoku

Install Golang dependencies

export GO111MODULE=on
go get -v -d -u ./...

Run server

go run cmd/gomoku/main.go -s

Run UI

You will need node (with npm and npx, included in recent node distributions).

cd ./ui

npm install

npm run serve

Performance

First, build it: go build ./cmd/gomoku

Run the binary and print out filename (slow):

pprof_file="$(./gomoku 2> >(grep -o '[^[:space:]]*pprof') | tail -1)" && echo "CPU profile created: $pprof_file"

graph_pdf="./profgraph$(date '+%F_%T').pdf" && go tool pprof --pdf $pprof_file > $graph_pdf && open $graph_pdf

OR

Run from source:

go run cmd/gomoku/main.go [-flags]

go tool pprof --pdf _FILE_ > file.pdf

open file.pdf

Production

Make a production-ready build. You will need docker and docker-compose.

[sudo] ./runit.sh