Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

App Engine Standard Java 8 - Pub/Sub Sample

Endpoints

  • GET / : Homepage provides a form to submit a message to be published
  • GET /info : Returns environment information
  • GET /publish : returns message ID on successfully publishing a message

Setup

  • Make sure gcloud is installed and authenticated.
  • Enable Google Cloud Pub/Sub API in your Google Cloud Platform project.
  • Create a topic:
       gcloud beta pubsub topics create <your-topic-name>

Run locally

Set the following environment variables and run using shown Maven command. You can then direct your browser to http://localhost:8080/.

export PUBSUB_TOPIC=<your-topic-name>
mvn clean appengine:run

Deploy

mvn clean appengine:deploy

Direct your browser to https://pubsub.your-project-id.appspot.com