- Make sure you have Go installed.
- Clone the repo
git clone https://github.com/shinochiha/gotoko.git
- Go to the directory and run go mod tidy to add missing requirements and to drop unused requirements
cd gotoko && go mod tidy
- Setup your .env file
cp .env-example .env && vi .env
- Start
go run main.go
- Install godoc
go install golang.org/x/tools/cmd/godoc@latest
- Run godoc in gotoko directory
godoc -http=:6060
- Open http://localhost:6060/pkg/github.com/shinochiha/gotoko in browser
- Update your open api documentation
go run main.go update
- Start
go run main.go
- Open http://localhost:4001/api/docs in browser
- Make sure you have db with name
main_test.db
with credentials same as DB_XXX - Test all with verbose output that lists all of the tests and their results.
ENV_FILE=$(pwd)/.env go test ./... -v
- Test all with benchmark.
ENV_FILE=$(pwd)/.env go test ./... -bench=.
- Compile packages and dependencies
go build -o gotoko main.go
- Setup .env file for production
cp .env-example .env && vi .env
- Run executable file with systemd, supervisor, pm2 or other process manager
./gotoko