Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Updates and Fixes + More Documentation #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kylepotts
Copy link
Collaborator

Adding more documentation on how to get started (with what little we have)

Also adding the ability to setup with no config file or setup with no host. The setup process will not create a config if it doesn't exist and ask the user to enter a ha host if it does not exist in the config.

…w for creation of config file and support setting up with no host name in the config file
@@ -26,7 +28,7 @@ const LOCAL_SERVER_HOST: &str = "127.0.0.1:8000";

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct HaConfig {
pub host: String,
pub host: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure i get why this is optional?

Copy link
Collaborator Author

@kylepotts kylepotts Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I made adding the host a part of the setup process. So technically when we first go to parse the config file, the way we can tell if we need to add run the add the host logic is by checking if this is None or Some.

I agree its a bit weird because it for sure isn't optional for the app to run but not sure of another good mechanism to let us know the user hasn't setup a host yet.

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants