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

echo demo #516

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

echo demo #516

wants to merge 2 commits into from

Conversation

aricart
Copy link
Member

@aricart aricart commented May 18, 2023

Example to match:
https://github.com/nats-io/natscli/blob/cb47d4fbf57b191d84c0badbeb4c763a8ab46b69/cli/micro_command.go#L71-L127

> deno run -A https://raw.githubusercontent.com/nats-io/nats.deno/echo-demo/examples/services/echo-service.ts

@aricart aricart requested review from bruth and ripienaar May 18, 2023 20:46
@aricart aricart temporarily deployed to CI May 18, 2023 21:37 — with GitHub Actions Inactive
Copy link

@ripienaar ripienaar left a comment

Choose a reason for hiding this comment

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

Seems good, I wonder if for demo repos we need to add all the client and management bits? May be a bit daunting and look like a ton of work, where we could have just a focus on the service for multiple languages and the cli being the client.

Then it looks nice and small and approachable?

[EXAMPLE] added sample service monitoring
@aricart aricart temporarily deployed to CI May 19, 2023 14:54 — with GitHub Actions Inactive
@aricart
Copy link
Member Author

aricart commented May 19, 2023

@ripienaar I took out all the service monitoring/request commands from the example - but I did add a nats-services tool that serves as an example for monitoring the services - this is not part of the demo

@aricart aricart requested a review from ripienaar May 19, 2023 14:56
Copy link

@ripienaar ripienaar left a comment

Choose a reason for hiding this comment

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

Yeah I like this, short and sweet, easy to pull out into a bit of doc as a guide through and starting point.

We should think a bit on standard naming conventions and config via environment vars, I might have some time this weekend to write up a go example thats 12 factor(ish) enough. Would be great if you can mix a go and javascript one and get exact behavior.

import { connect, headers } from "../../src/mod.ts";

const root = cli({
use: "echo-service [--server server:port]",

Choose a reason for hiding this comment

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

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.

None yet

2 participants