feat(server): add config option for server port

Jef Roosens 2022-06-15 12:10:58 +02:00
parent 3f442d7290
commit 2fea78a6f8
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
3 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Moved all API routes under `/v1` namespace
* Server port can now be configured
## [0.3.0](https://git.rustybever.be/vieter/vieter/src/tag/0.3.0)

View File

@ -10,6 +10,7 @@ pub:
data_dir string
api_key string
default_arch string
port int = 8000
}
// cmd returns the cli submodule that handles starting the server

View File

@ -8,7 +8,6 @@ import util
import db
const (
port = 8000
log_file_name = 'vieter.log'
repo_dir_name = 'repos'
db_file_name = 'vieter.sqlite'
@ -77,5 +76,5 @@ pub fn server(conf Config) ? {
conf: conf
repo: repo
db: db
}, server.port)
}, conf.port)
}