This is a repository that contains Java code samples for Google App Engine flexible environment.
See our other Google Cloud Platform GitHub repos for sample applications and scaffolding for other frameworks and use cases.
Get the latest sample code from GitHub using Git or download the repository as a ZIP file. (Download)
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
- Follow the quickstart for Java in the App Engine flexible
environment to
set up your environment to deploy the sample applications App Engine.
-
Download and install the Google Cloud SDK.
-
Create a new Google Cloud Platform project, or use an existing one.
-
Initialize the Cloud SDK.
gcloud init
-
To run the application locally, use the Maven Jetty plugin.
mvn clean jetty:run
View the app at localhost:8080.
To deploy the app to App Engine, run
mvn clean appengine:deploy
After the deploy finishes (can take up to 10 minutes), you can view your application at
https://YOUR_PROJECT.appspot.com
, where YOUR_PROJECT
is your Google Cloud project ID. You can
see the new version deployed on the App Engine section of the Google Cloud
Console.
For a more detailed walkthrough, see the getting started guide for Java in the App Engine flexible environment.
- See CONTRIBUTING.md
- See LICENSE