Mist will not allow us to directly query the marvis endpoint from a non-origin domain. Thus, we need a proxy.
We'll use AWS Lambda + API Gateway
Create a new lambda function and drop the "index.js" code in it. It should be a NodeJS environment with the default specs (memory/cpu/etc...)
Make sure you fill in 2 environment variables: TOKEN & ORG that the lambda uses to communicate back to Mist.
- Create a new REST API Gateway
- Create an Resource. Can just be "/"
- Click "Actions" > "Enable CORS" and make sure its enabled.
- On your resource, create a new Method called "POST" - Make sure to check LAMBDA_PROXY
- Edit that method to invoke your Lambda.