- 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
- Make sure
gcloudis 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>
- Update the environment variables
PUBSUB_TOPICinappengine-web.xml.
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
mvn clean appengine:deploy
Direct your browser to https://pubsub.your-project-id.appspot.com