Fixes #29. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d26879a333
commit
2c3ca08dbf
9 changed files with 24 additions and 39 deletions
|
@ -13,9 +13,10 @@ import (
|
|||
"path/filepath"
|
||||
"syscall"
|
||||
|
||||
"git.riou.xyz/jriou/coller/internal"
|
||||
"golang.design/x/clipboard"
|
||||
"golang.org/x/term"
|
||||
|
||||
"git.riou.xyz/jriou/coller/internal"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -18,7 +18,7 @@ The file format is **JSON**:
|
|||
* **title** (string): Title of the website
|
||||
* **database_type** (string): Type of the database (default "sqlite", "postgres" also supported)
|
||||
* **database_dsn** (string): Connection string for the database (default "collerd.db")
|
||||
* **id_length** (int): Number of characters for note identifiers (default 5)
|
||||
* **node_id** (int): Number between 0 and 1023 to define the node generating identifiers (see [snowflake](https://github.com/bwmarrin/snowflake))
|
||||
* **password_length** (int): Number of characters for generated passwords (default 16)
|
||||
* **expiration_interval** (int): Number of seconds to wait between two expiration runs
|
||||
* **listen_address** (string): Address to listen for the web server (default "0.0.0.0")
|
||||
|
|
|
@ -5,9 +5,10 @@ import (
|
|||
"log/slog"
|
||||
"os"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
||||
"git.riou.xyz/jriou/coller/internal"
|
||||
"git.riou.xyz/jriou/coller/server"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -69,7 +70,6 @@ func handleMain() int {
|
|||
return internal.ReturnError(logger, "could not create server", err)
|
||||
}
|
||||
|
||||
srv.SetIDLength(config.IDLength)
|
||||
srv.SetPasswordLength(config.PasswordLength)
|
||||
|
||||
if config.EnableMetrics {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue