OpenSGS

April 14, 2022 ยท View on GitHub

Get Started

Requirements

  • Go 1.17+
  • Go modules enabled

Run Locally

  1. Clone the repository
    git clone https://github.com/Mogara/OpenSGS.git
    
  2. Install dependencies
    cd OpenSGS
    go mod download
    
  3. Run the server
    go run cmd/server/main.go
    

CLI Usage

flagdescriptiondefaulttype
--hosthost to listen onlocalhoststring
--portport to listen on8080number
--log-levellog levelinfostring
--allowed-originallowed request originarray
--debugenable debug modefalsebool

Development

  1. Setup Go environment(v1.17)
  2. Install golangci-lint
  3. Install pre-commit
  4. Install pre-commit hooks
    # install commit-msg hook
    pre-commit install --hook-type commit-msg 
    pre-commit install --hook-type pre-push
    # install pre-commit hook
    pre-commit install
    # test hooks
    pre-commit run --all-files