GeoAwareness Mobile Tracker is a mobile website that emulates the customer experience for placing an order and tracking location as the customer progresses towards the store.
-
Create an API key. Mobile Tracker uses API key authentication for Google Maps and GeoAwareness APIs. Take care to follow API key best practices, including Securing an API key. The API key must have permissions for the Google Maps Platform JavaScript API, Directions API and the GeoAwareness REST API.
-
Configure - Edit
config.json
for your environment with proper values.
- "YOUR_API_KEY" - replace with the API key created from the previous step.
- "GEOAWARENESS_REST_API_ENDPOINT" - replace with url of the geoawareness-api.
"geoawarenessRestApi": "https://api-sbx.geoawareness.woolpert.dev"
python3 -m http.server
The web application is available at http://locahost:8000.
Mobile Tracker is hosted in Google Cloud Storage as a static website.
-
Create GCS bucket. Choose a custom domain name and create a bucket.
# create bucket gsutil mb gs://mobile-tracker.<your-domain> # eg. gs://mobile-tracker.geoawareness.woolpert.dev # set permissions gsutil iam ch allUsers:objectViewer gs://mobile-tracker.<your-domain>
-
HTTPs support. Set up Cloud Load balancing for https support.
-
Deploy website to GCS bucket.
# remove all files gsutil rm -r gs://mobile-tracker.<your-domain>/* # copy static files gsutil cp -r src assets index.html config.json favicon.ico gs://mobile-tracker.<your-domain> # optionally remove default cache settings, useful for development and testing gsutil -m setmeta -r -h "Cache-Control:no-cache, max-age=0" gs://mobile-tracker.<your-domain>/*