Skip to content

[event-hubs] Updating samples folder to make it a standalone project#6413

Merged
richardpark-msft merged 15 commits into
Azure:masterfrom
richardpark-msft:richardpark-eh-ga-samples
Dec 10, 2019
Merged

[event-hubs] Updating samples folder to make it a standalone project#6413
richardpark-msft merged 15 commits into
Azure:masterfrom
richardpark-msft:richardpark-eh-ga-samples

Conversation

@richardpark-msft
Copy link
Copy Markdown
Member

@richardpark-msft richardpark-msft commented Dec 4, 2019

Improving the samples by making them:

  • Simpler for users to just download and run.
  • Makes it more effective for us as a testing tool since we can use it to test whatever is published based on using @next as the default version for the packages.
  • Lets us use some convenient libraries like dotenv.

Also, made an improvement to the sendEvents.ts example, fixing #6254

* Makes it simpler for users to just download the entire folder, npm install and run.
* Makes it more effective for us as a testing tool since we can use it to test whatever is published.
@richardpark-msft
Copy link
Copy Markdown
Member Author

@willmtemple - I think you've got the most experience on this. Let's talk when you get back about what I should do here.

@richardpark-msft richardpark-msft marked this pull request as ready for review December 9, 2019 20:45
Comment thread sdk/eventhub/event-hubs/samples/package.json
Comment thread sdk/eventhub/event-hubs/samples/package.json Outdated
Comment thread sdk/eventhub/event-hubs/samples/package.json Outdated
Comment thread sdk/eventhub/event-hubs/samples/receiveEvents.ts Outdated
Comment thread sdk/eventhub/event-hubs/samples/runsamples.ts
Comment thread sdk/eventhub/event-hubs/samples/runsamples.ts
…sample a bit more readable.

* Moved the import and the call to the bottom to make it more obvious which parts are "this is sample stuff" and which parts are "this is the code that you want to use"
… environment variables get initialized before the sample runs.
@richardpark-msft
Copy link
Copy Markdown
Member Author

@chradek / @ramya-rao-a - looks like @willmtemple is okay with the changes. Mind approving this if you're okay with it as well? For the most part it's just changes to make the samples standalone.

I did update sendEvents.ts with @ramya-rao-a 's suggested logic (but without the recursion).

Copy link
Copy Markdown
Contributor

@willmtemple willmtemple left a comment

Choose a reason for hiding this comment

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

Cool. Let's merge this and I'll do the readme metadata in a separate PR after I merge some changes to storage.

Comment thread sdk/eventhub/event-hubs/samples/package.json
Comment thread sdk/eventhub/event-hubs/samples/package.json
Comment thread sdk/eventhub/event-hubs/samples/receiveEvents.ts
Comment thread sdk/eventhub/event-hubs/samples/runsamples.ts Outdated
Comment thread sdk/eventhub/event-hubs/samples/runsamples.ts
Comment thread sdk/eventhub/event-hubs/samples/package.json Outdated
Comment thread sdk/eventhub/event-hubs/samples/package.json Outdated
Comment thread sdk/eventhub/event-hubs/samples/tsconfig.json
Comment thread sdk/eventhub/event-hubs/samples/package.json Outdated
Comment thread sdk/eventhub/event-hubs/samples/tsconfig.json Outdated
@richardpark-msft richardpark-msft merged commit 887e83a into Azure:master Dec 10, 2019
@richardpark-msft richardpark-msft deleted the richardpark-eh-ga-samples branch December 10, 2019 22:07
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.

4 participants