-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Added mailgun example. #19
Conversation
PORT: 8080 | ||
``` | ||
|
||
Create a `config.js` in the root of your application with the following |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the other GAE node examples will use environment variables. Can you use that for consistency or do you feel strongly about config.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would the environment variable be set? I think it's unsafe (and not a practice I want to encourage) to put keys/secrets into a file that gets committed to source control. config.js
is ignored by git. The Geddy sample also uses a git-ignored file:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really torn on this. We need to be consistent with the other samples, which all use environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of my major friction points on my initial project was: How do I provide config to my app in various environments? I couldn't set environment variables without committing config to my app's source control (not gonna do that), so I used a git-ignored config file.
If we want the little samples to be simpler by just committing config to source control, then for the samples that have config I think there should be a disclaimer that says something like "In a production app, here's how you might get config into your app: <link to article about it or link to built-for-production sample app, e.g. LabelCat>"
In general, this samples seems to have too much code that isn't related to what it's demonstrating. The part about sending mail is fine though. |
After our offline discussion, do you want to update this PR or start a new one with the more bare-bones sample? |
I'm updating this PR right now |
👍 |
Updated |
1. Add a [new domain](https://mailgun.com/app/domains). | ||
1. Find your API key in your new domain's settings. | ||
|
||
### Create a new Node.js app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section title doesn't match the content. Maybe remove this section and move its content up to the first section "Mailgun on Google App Engine".
Changes made |
> [Mailgun](https://www.mailgun.com/): The Email Service For Developers | ||
|
||
This example uses [Express.js](http://expressjs.com) and | ||
[node-mailgun](http://github.com/shz/node-mailgun). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more nit:
This sample application demonstrates how to use [Express.js](http://expressjs.com) and [node-mailgun](http://github.com/shz/node-mailgun) to send transactional email on [Google App Engine](https://cloud.google.com/appengine).
🤖 I have created a release \*beep\* \*boop\* --- ## [1.1.0](https://www.github.com/googleapis/nodejs-contact-center-insights/compare/v1.0.2...v1.1.0) (2021-07-30) ### Features * update CCAI Insights protos. change nesting of Conversation.Transcript.Participant to ConversationParticipant and remove AnnotationBoundary.time_offset ([#19](https://www.github.com/googleapis/nodejs-contact-center-insights/issues/19)) ([7501a27](https://www.github.com/googleapis/nodejs-contact-center-insights/commit/7501a276f8159fb7fdc21aad1a19d108fde61c8a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release \*beep\* \*boop\* --- ### [1.0.3](https://www.github.com/googleapis/nodejs-eventarc/compare/v1.0.2...v1.0.3) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#18](https://www.github.com/googleapis/nodejs-eventarc/issues/18)) ([b79618b](https://www.github.com/googleapis/nodejs-eventarc/commit/b79618b20957262678fa00c85203b045c6e34b63)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
* Upgrade repo-tools and regenerate scaffolding. * fix lint task in circleci
* Upgrade repo-tools and regenerate scaffolding. * fix lint task in circleci
* Upgrade repo-tools and regenerate scaffolding. * fix lint task in circleci
* Upgrade repo-tools and regenerate scaffolding. * fix lint task in circleci
* chore: lock files maintenance * chore: lock files maintenance
* chore: lock files maintenance * chore: lock files maintenance
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* add try/catch to delete operations in testing * refactor test file; use timestamp for resource names, clean up resources over an hour old, move create and delete operations to before and after hooks in each test suite * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* add try/catch to delete operations in testing * refactor test file; use timestamp for resource names, clean up resources over an hour old, move create and delete operations to before and after hooks in each test suite * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
@jonparrott