Based on discussion in issue #37, this PR moves the standalone_mode and disable_auth parameters into Rocket.toml.
Then, instead of reading the values from environment variables and using lazy_static to define global variables, we load them from the Rocket figment provider and add them to managed state.
Managed state is rad because it can be accessed in routes and in request guards. We can easily extend the RocketConfig struct in the future to accommodate more config parameters. Since this seems to be "the Rocket way" of managing application state, I'm pretty happy about the change.
I also changed development -> debug and production -> release in Rocket.toml. These profile names must have changed in Rocket somewhere along the way (I had been wondering why disable_auth wasn't taking effect like it should be...now it works as expected).
Based on discussion in [issue #37](https://git.coopcloud.tech/PeachCloud/peach-workspace/issues/37), this PR moves the `standalone_mode` and `disable_auth` parameters into `Rocket.toml`.
Then, instead of reading the values from environment variables and using `lazy_static` to define global variables, we load them from the Rocket figment provider and add them to managed state.
Managed state is rad because it can be accessed in routes and in request guards. We can easily extend the `RocketConfig` struct in the future to accommodate more config parameters. Since this seems to be "the Rocket way" of managing application state, I'm pretty happy about the change.
I also changed `development` -> `debug` and `production` -> `release` in `Rocket.toml`. These profile names must have changed in Rocket somewhere along the way (I had been wondering why `disable_auth` wasn't taking effect like it should be...now it works as expected).
CC: @notplants
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Based on discussion in issue #37, this PR moves the
standalone_modeanddisable_authparameters intoRocket.toml.Then, instead of reading the values from environment variables and using
lazy_staticto define global variables, we load them from the Rocket figment provider and add them to managed state.Managed state is rad because it can be accessed in routes and in request guards. We can easily extend the
RocketConfigstruct in the future to accommodate more config parameters. Since this seems to be "the Rocket way" of managing application state, I'm pretty happy about the change.I also changed
development->debugandproduction->releaseinRocket.toml. These profile names must have changed in Rocket somewhere along the way (I had been wondering whydisable_authwasn't taking effect like it should be...now it works as expected).CC: @notplants