This application implements a simple backend for a greeting api using Google Cloud Endpoints, App Engine, Oauth2 and Java.
-
Go to https://code.google.com/apis/console and create or choose your project.
-
Click on API Access link, fill in all relevant infomations and click
create a new Oauth2 client ID
orcreate anthor client ID
if you already created one- make sur that
web application
is selected - click
Your site or hostname (more options)
link and then fill in : optional :Authorized Redirect URIs : https://app-id.appspot.com
required :Authorized JavaScript Origins : https://app-id.appspot.com
. Add all urls that will be used to access your app (localhost:8080 for example to test locally). - validate your creation
- make sur that
-
Update the value of
application
inappengine-web.xml
to the app ID you have registered in the App Engine admin console and would like to use to host your instance of this sample. -
Update the values in
src/main/java/sfeir/devs/samples/spi/Ids.java
to reflect the respective client IDs you have registered in the APIs Console. -
Update the value of
CLIENT_ID
inwebapp/js/base.js
to reflect the web client ID you have registered in the APIs Console. -
mvn clean install
-
Run the application with
mvn appengine:devserver
, and ensure it's running by visiting your local server's address (by default localhost:8080.) -
Regenerate client lib by running : mvn appengine:endpoints_get_client_lib
-
Deploy your application to GAP : mvn appengine:update
-
Access your application on https://app-id.appspot.com
Your done