Skip to content

ngalaiko/miniboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miniboard

CI StatusCoverage StatusGo Report Card

Configuration

Backend

Command line arguments

Command line Default Description
config Path to the configuration file
verbose false Enable verbose logging

Configuration file

db:
  addr: "sqlite3://db.sqilite3" # db address
  max_open_connections: 1       # max open connections to db
http:
  addr: ":8080" # address to listen on
  tls:
    enabled: true          # if false, plaintext http will be used
    key_path: "./key.pem"  # path to tls key
    cert_path: "./crt.pem" # path to tls certificate
subsciptions:
  updates:
    workers: 10  # number of workers that update subscriptions in background
    interval: 5m # interval between feed updates
users:
  bcrypt_cose: 14 # bcrypt cost
web:
  fs: true      # if true, files will be served from the filesystem
  gzip_level: 5 # gzip compression level

Environment variables

It is also possible to define any configuration value by setting an environment value, for example:

  • MINIBOARD_HTTP_ADDR will override http.addr
  • MINIBOARD_DB_DRIVER will override db.driver
  • etc.

Development

  1. Run server:
$ cd ./backend \
    && go run cmd/miniboard/main.go \
        --verbose \
        --config config.dev.yaml
  1. Open browser:
$ open http://localhost/

Acknowledgments