diff --git a/CHANGELOG.md b/CHANGELOG.md index 9adee075..5fe1de7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://git.rustybever.be/vieter/vieter/src/branch/dev) +### Added + +* Server port can now be configured + ### Changed * Moved all API routes under `/v1` namespace +* Renamed `vieter repos` to `vieter targets` +* Renamed `/v1/api/repos` namespace to `/v1/api/targets` ## [0.3.0](https://git.rustybever.be/vieter/vieter/src/tag/0.3.0) diff --git a/docs/content/configuration.md b/docs/content/configuration.md index 600c6f35..f4bf9649 100644 --- a/docs/content/configuration.md +++ b/docs/content/configuration.md @@ -45,7 +45,8 @@ configuration variable required for each command. This prevents the server from being confused when an `any` package is published as the very first package for a repository. * Git repositories added without an `arch` value use this value instead. - +* `port`: HTTP port to run on + * Default: `8000` ### `vieter cron` diff --git a/src/server/cli.v b/src/server/cli.v index 53393f70..a62f56ec 100644 --- a/src/server/cli.v +++ b/src/server/cli.v @@ -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 diff --git a/src/server/server.v b/src/server/server.v index 2309ee7b..1a9df3f8 100644 --- a/src/server/server.v +++ b/src/server/server.v @@ -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) }