-
Notifications
You must be signed in to change notification settings - Fork 349
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
Make react-chat-app easy to run for new developers #406
base: next
Are you sure you want to change the base?
Conversation
Helps new developers get an app up and running.
The failing build looks like an unrelated race condition. |
Hey @snickell thanks for the PR :) As a rule, we don't commit config.toml files to the repo, since they contain token secrets. Even for example apps, this is a bad practice since people may be tempted to use the token secret in production not realizing it's in there. So I'd say the instruction steps should tell the user to run |
@deontologician I noticed that Alternatively, would it be so bad to submit a config file with just the project-name in it? |
Theoretically, we should allow a missing |
@deontologician It fails if
so you can just pass it |
Ah, ok. I guess that should be ok then. So for this PR, would you just remove the |
@deontologician no prob, though I think this user experience still leaves something to be desired for first-time developers. I'd just like to say that I think horizon is really cool, and I'm over this step myself, but I'd really like horizon to succeed, so I'd like new developers to have really pleasant experiences with it. So if my input is helpful, great, and if not, totally ignore it and get on with working on stuff you think is more important! Here's why I think having to set token_secret in config.toml isn't great for an example that many/most first-time developers will be running to figure out how to do "the next step":
Is there some way to have cake and eat it too here? |
So theoretically, we could leave the token_secret out, and only require it once you enable authentication methods other than Those are the constraints as I see them. I think the easiest thing to attack might be adding the token secret to your config once you need authentication. It's annoying, but adding authentication is a step from "playing around" to "I'm doing this for real" so maybe it's not such a big deal (Also, thanks for writing down your thoughts, we really appreciate the feedback) |
We could also modify the error message from the server if no token is specified to read somewhat like this:
|
Yeah, good error messages will be essential. I think we could probably offer to insert the config item into their config.toml. Maybe appending a line to the end of the file if it doesn't already have a |
It took me about an hour to get my first working client/server example horizon app running. There's a lot of details to figure out, and the examples don't include .hz/config.toml files.
This makes one of the examples really easy to run, and points new developers toward that example.
I think this would save a lot of first time developers a lot of time.
This change is