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

Optional --https mode for dev inner loop #96

Merged
merged 2 commits into from
Jul 22, 2022
Merged

Optional --https mode for dev inner loop #96

merged 2 commits into from
Jul 22, 2022

Conversation

ian-craig
Copy link
Collaborator

I recently added a npm run start command to serve your local version of the card as a resource for HA. (See Readme "Development Inner Loop" section)

If your HA is running on https, this doesn't work as the resource needs to also be https but we're currently serving on http.

This PR adds the devcert package to generate and register a self-signed certificate for localhost so that we can serve on https. This is only enabled if you pass --https by running npm run start -- --https. I chose to make this optional as it's a little less reliable and has extra prompts so I wanted to make sure we don't block anyone who doesn't need it.

Copy link
Owner

@ikaruswill ikaruswill left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for this!

@ikaruswill ikaruswill merged commit fc7e659 into master Jul 22, 2022
@ikaruswill ikaruswill deleted the devcerts branch July 22, 2022 10:36
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