DroneDeploy
Search…
How to Set up a Web Server
Why set up a server?
To proxy connections to avoid CORS issues and handle processing while the app's iframe is closed. For background on CORS, see: this link
Contents

Example Webserver

First clone the example which uses the tornado webserver to query the Google Maps API, available here.
The example uses tornado to send a request to Google Map's API to return the geocoded output of a street address, in the format used by the national postal service of the country concerned. Documentation on the specific outputs and queries for this API is available here
CORS Headers
The headers found in the example allow for cross-origin requests to be made from the DroneDeploy plugin to the webserver in the example repository.

How to Set up Heroku

Create an account on Heroku, download the Heroku CLI, and run
1
heroku login
Copied!
This will allow you to setup the command line client for Heroku access.
Now use heroku to create your new app server. For the purposes of this tutorial, we will use the example web server (sample-app-server).
1
heroku create --ssh-git sample-app-server
2
git clone [email protected]:sample-app-server
Copied!
For local testing using the example available on git, run
1
API_KEY=your_google_maps_api_key python nado.py
Copied!
For testing on Heroku, run:
1
heroku config:set API_KEY=your_google_maps_api_key
Copied!