Install Http Toolkit
Install httpie with:
brew install httpieClone the repo with:
git clone https://github.com/athenian-robotics/web-services-demo.gitInstall the required python packages with:
pip install -r requirements.txtStart the server with:
python3 src/server.pyInstall ngrok with:
brew cask install ngrokLaunch ngrok with:
ngrok http 8080Create a new Heroku app with:
heroku create [APP_NAME]
Deploy code to Heroku with:
git push heroku master
Open Heroku app in browser with:
heroku open
or visit http://APP_NAME.herokuapp.com.
View server logs with the heroku logs command with:
heroku logs --tail
Say hello with:
http :8080/plain-hello
http :8080/html-helloQuery all customers with:
http :8080/customersQuery customers by id with:
http :8080/customers/1
http :8080/customers/2
http :8080/customers/3Query customers by name with:
http :8080/customer_query?name=BillAdd values via POST with:
http :8080/customers name='Joe Jackson'
http :8080/customers
http :8080/customers name='Jill West' address='456 Sycamore Lane'
http :8080/customersQuery all customers with:
src/all_customers.pyQuery customers by id with:
src/customer_by_id.py -i 1
src/customer_by_id.py -i 2
src/customer_by_id.py -i 3Query customers by name with:
src/customer_by_name.py -n BillCreate a new customer with:
src/create_customer.py -n "Mike Bryant" -a "1831 Dupont St"