- AWS Directions
- TLDR:
python pip install awsebcli --upgrade --user
or Recommended:python pip3 install awsebcli --upgrade --user
python eb terminate flask-env
- AWS Directions
- Notes:
-
After:
python pip install flask==0.10.1
install requestspip3 install requests
or you can just copy the requirements.txt file from this repo! -
Don’t use:
python ~/eb-flask$ eb init -p python2.7 flask-tutorial
Use:eb init
and follow the prompts. -
The remainder of the directions assume you name your environment
blockchain-env
-
Python version is 3.6.0
-
You can find the AWS credentials in the slack channel (look for an excel file) or you can create your own if you’re using your own Amazon account.
-
You can open the Flask application using:
eb open
You should see a new tab open in your browser that looks like this: -
You can use the blockchain by executing GET / POSTS requests to the corresponding URL. For example given the base url returned from EB: http://blockchain-env.frpxa3yuwp.us-east-1.elasticbeanstalk.com/ you can make requests to:
- ‘/mine’
- ‘/transactions/new’
- ‘/chain’
- ‘/nodes/register’
- ‘/nodes/resolve'
-
Sample EHR records are still executed on ‘/transactions/new’. JSON should be in the form:
-
{
"patient": "Bart Simpson",
"physician": "Doogie Howser",
"date": "Feb 20, 2018",
"notes": "Annual physical"
}
- Be sure to terminate the instance when you’re done:
python eb terminate blockchain-env