Skip to content

shinochiha/gotoko

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gotoko

Getting Started

  1. Make sure you have Go installed.
  2. Clone the repo
git clone https://github.com/shinochiha/gotoko.git
  1. Go to the directory and run go mod tidy to add missing requirements and to drop unused requirements
cd gotoko && go mod tidy
  1. Setup your .env file
cp .env-example .env && vi .env
  1. Start
go run main.go

Code Documentation

  1. Install godoc
go install golang.org/x/tools/cmd/godoc@latest
  1. Run godoc in gotoko directory
godoc -http=:6060
  1. Open http://localhost:6060/pkg/github.com/shinochiha/gotoko in browser

Open API Documentation

  1. Update your open api documentation
go run main.go update
  1. Start
go run main.go
  1. Open http://localhost:4001/api/docs in browser

Test

  1. Make sure you have db with name main_test.db with credentials same as DB_XXX
  2. Test all with verbose output that lists all of the tests and their results.
ENV_FILE=$(pwd)/.env go test ./... -v
  1. Test all with benchmark.
ENV_FILE=$(pwd)/.env go test ./... -bench=.

Build for production

  1. Compile packages and dependencies
go build -o gotoko main.go
  1. Setup .env file for production
cp .env-example .env && vi .env
  1. Run executable file with systemd, supervisor, pm2 or other process manager
./gotoko

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published