Skip to content

Conversation

@argshook
Copy link
Contributor

in This PR:

  • format example code with prettier
  • use localhost instead of 127.0.0.1 in examples

The example code is used in other code bases to showcase how this client
should be used.

It is also used with examples.manifest.yaml, which describes examples with interpolatable values.

In particular, the examples.manifest.yaml has these:

 addr: host: localhost port: 9009 

when example code like ./examples/basic.js is interpolated with values from examples.manifest.yaml, the host part is missed.

Thus, we should be consistent and in both examples.manifest.yaml and examples/*.js use as host either:

  1. localhost or
  2. 127.0.0.1

This PR chooses localhost

use prettier for example snippets. The result is code formatted in a way more familiar way for javascript developer
@argshook argshook self-assigned this Sep 26, 2022
@argshook argshook requested a review from glasstiger September 26, 2022 10:29
@glasstiger glasstiger merged commit d268dc2 into main Sep 26, 2022
@argshook argshook deleted the fix-host-in-examples branch September 26, 2022 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants