This example demonstrates how to use polygons drawn on a Google Map with the Earth Engine JavaScript client library.
To set up, follow the instructions in the Developer Docs to deploy an EE-based App Engine app. For the credentials section, you'll need an OAuth2 Client ID, not a Service Account.