-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve READMEs for App Engine samples.
These are linked to from https://cloud.google.com/java/, so we should have a more welcoming landing page than the existing list of folders.
- Loading branch information
Showing
9 changed files
with
240 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Google App Engine Standard Environment Java Samples | ||
|
||
This is a repository that contains Java code samples for [Google App Engine | ||
standard environment][ae-docs]. | ||
|
||
[ae-docs]: https://cloud.google.com/appengine/docs/java/ | ||
|
||
## Prerequisites | ||
|
||
### Download Maven | ||
|
||
These samples use the [Apache Maven][maven] build system. Before getting | ||
started, be sure to [download][maven-download] and [install][maven-install] it. | ||
When you use Maven as described here, it will automatically download the needed | ||
client libraries. | ||
|
||
[maven]: https://maven.apache.org | ||
[maven-download]: https://maven.apache.org/download.cgi | ||
[maven-install]: https://maven.apache.org/install.html | ||
|
||
### Create a Project in the Google Cloud Platform Console | ||
|
||
If you haven't already created a project, create one now. Projects enable you to | ||
manage all Google Cloud Platform resources for your app, including deployment, | ||
access control, billing, and services. | ||
|
||
1. Open the [Cloud Platform Console][cloud-console]. | ||
1. In the drop-down menu at the top, select **Create a project**. | ||
1. Give your project a name. | ||
1. Make a note of the project ID, which might be different from the project | ||
name. The project ID is used in commands and in configurations. | ||
|
||
[cloud-console]: https://console.cloud.google.com/ | ||
|
||
|
||
## Samples | ||
|
||
### Hello World | ||
|
||
This sample demonstrates how to deploy an application on Google App Engine. | ||
|
||
- [Documentation][ae-docs] | ||
- [Code](helloworld) | ||
|
||
### Sending Email | ||
|
||
#### Sending Email with Mailgun | ||
|
||
This sample demonstrates how to send email using the [Mailgun API][mailgun-api]. | ||
|
||
- [Documentation][mailgun-sample-docs] | ||
- [Code](mailgun) | ||
|
||
[mailgun-api]: https://documentation.mailgun.com/ | ||
[mailgun-sample-docs]: https://cloud.google.com/appengine/docs/java/mail/mailgun | ||
|
||
#### Sending Email with SendGrid | ||
|
||
This sample demonstrates how to send email using the [SendGrid][sendgrid]. | ||
|
||
- [Documentation][sendgrid-sample-docs] | ||
- [Code](sendgrid) | ||
|
||
[sendgrid]: https://sendgrid.com/docs/User_Guide/index.html | ||
[sendgrid-sample-docs]: https://cloud.google.com/appengine/docs/java/mail/sendgrid | ||
|
||
### Sending SMS with Twilio | ||
|
||
This sample demonstrates how to use [Twilio](https://www.twilio.com) on [Google | ||
App Engine standard environment][ae-docs]. | ||
|
||
- [Documentation][twilio-sample-docs] | ||
- [Code](twilio) | ||
|
||
[twilio-sample-docs]: https://cloud.google.com/appengine/docs/java/sms/twilio | ||
|
||
### App Identity | ||
|
||
This sample demonstrates how to use the [App Identity API][appid] to discover | ||
the application's ID and assert identity to Google and third-party APIs. | ||
|
||
- [Documentation][appid] | ||
- [Code](appidentity) | ||
|
||
[appid]: https://cloud.google.com/appengine/docs/java/appidentity/ | ||
|
||
### Other Samples | ||
|
||
- [Sample Applications][sample-apps] | ||
|
||
[sample-apps]: https://cloud.google.com/appengine/docs/java/samples | ||
|
||
|
||
## Contributing changes | ||
|
||
See [CONTRIBUTING.md](../CONTRIBUTING.md). | ||
|
||
## Licensing | ||
|
||
See [LICENSE](../LICENSE). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Java Mailgun Email Sample for Google App Engine Standard Environment | ||
|
||
This sample demonstrates how to use [Mailgun][mailgun-api] on [Google App Engine | ||
standard environment][ae-docs]. | ||
|
||
See the [sample application documentaion][sample-docs] for more detailed | ||
instructions. | ||
|
||
[ae-docs]: https://cloud.google.com/appengine/docs/java/ | ||
[mailgun-api]: https://documentation.mailgun.com/ | ||
[sample-docs]: https://cloud.google.com/appengine/docs/java/mail/mailgun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
# Java SendGrid email sample for Google Managed VMs | ||
This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on Google Managed VMs | ||
For more information about SendGrid, see their [documentation](https://sendgrid.com/docs/User_Guide/index.html). | ||
# Java SendGrid Email Sample for Google App Engine Standard Environment | ||
|
||
This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on | ||
[Google App Engine standard environment][ae-docs]. | ||
|
||
See the [sample application documentaion][sample-docs] for more detailed | ||
instructions. | ||
|
||
For more information about SendGrid, see their | ||
[documentation](https://sendgrid.com/docs/User_Guide/index.html). | ||
|
||
[ae-docs]: https://cloud.google.com/appengine/docs/java/ | ||
[sample-docs]: https://cloud.google.com/appengine/docs/java/mail/sendgrid | ||
|
||
## Setup | ||
|
||
Before you can run or deploy the sample, you will need to do the following: | ||
1. [Create a SendGrid Account](http://sendgrid.com/partner/google). As of September 2015, Google users start with 25,000 free emails per month. | ||
1. Configure your SendGrid settings in the environment variables section in ``src/main/appengine/app.yaml``. | ||
|
||
1. [Create a SendGrid Account](http://sendgrid.com/partner/google). As of | ||
September 2015, Google users start with 25,000 free emails per month. | ||
1. Configure your SendGrid settings in the environment variables section in | ||
[`src/main/webapp/WEB-INF/appengine-web.xml`](src/main/webapp/WEB-INF/appengine-web.xml). | ||
|
||
## Running locally | ||
|
||
You can run the application locally and send emails from your local machine. You | ||
will need to set environment variables before starting your application: | ||
|
||
$ export SENDGRID_API_KEY=[your-sendgrid-api-key] | ||
$ export SENDGRID_SENDER=[your-sendgrid-sender-email-address] | ||
$ mvn clean jetty:run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
# Java SendGrid email sample for Google Managed VMs | ||
This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on Google Managed VMs | ||
For more information about SendGrid, see their [documentation](https://sendgrid.com/docs/User_Guide/index.html). | ||
# Java SendGrid Email Sample for Google App Engine Flexible Environment | ||
|
||
This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on | ||
[Google App Engine flexible environment][aeflex-docs]. | ||
|
||
See the [sample application documentaion][sample-docs] for more detailed | ||
instructions. | ||
|
||
For more information about SendGrid, see their | ||
[documentation](https://sendgrid.com/docs/User_Guide/index.html). | ||
|
||
[aeflex-docs]: https://cloud.google.com/appengine/docs/flexible/ | ||
[sample-docs]: https://cloud.google.com/appengine/docs/flexible/java/sending-emails-with-sendgrid | ||
|
||
## Setup | ||
|
||
Before you can run or deploy the sample, you will need to do the following: | ||
1. [Create a SendGrid Account](http://sendgrid.com/partner/google). As of September 2015, Google users start with 25,000 free emails per month. | ||
1. Configure your SendGrid settings in the environment variables section in ``src/main/appengine/app.yaml``. | ||
|
||
1. [Create a SendGrid Account](http://sendgrid.com/partner/google). As of | ||
September 2015, Google users start with 25,000 free emails per month. | ||
1. Configure your SendGrid settings in the environment variables section in | ||
[`src/main/appengine/app.yaml`](src/main/appengine/app.yaml). | ||
|
||
## Running locally | ||
|
||
You can run the application locally and send emails from your local machine. You | ||
will need to set environment variables before starting your application: | ||
|
||
$ export SENDGRID_API_KEY=[your-sendgrid-api-key] | ||
$ export SENDGRID_SENDER=[your-sendgrid-sender-email-address] | ||
$ mvn clean jetty:run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters