Backend - SMEISEN/RidingCoachApp GitHub Wiki
Navigate to /backend/tests
Open the terminal in this folder
Use the .raw
file
backend/tests/4cbf23f48cb0edfa.raw
to create a POST request
curl -H 'host: 659edb8e.proxy.webhookapp.com' -H 'connection: close' -H 'user-agent: CloudMailin Server' -H 'content-type: multipart/form-data; boundary=----cloudmailinboundry' -H 'accept-encoding: gzip, compressed' -H 'x-request-id: 8a01c859-cfdb-4188-9883-8a33ead2a2ad' -H 'x-forwarded-for: 52.64.201.55' -H 'x-forwarded-proto: https' -H 'x-forwarded-port: 443' -H 'via: 1.1 vegur' -H 'connect-time: 0' -H 'x-request-start: 1610891804516' -H 'total-route-time: 0' -H 'content-length: 16053' --data-binary @4cbf23f48cb0edfa.raw --request POST http://localhost:5000/api/email
New test-files can be created with the Webhook App
- Open heoku dashboard
- Click on cloudmailin add-on
- Click on "Debug in WebhookApp"
- Login
- Send an email with a lap-list to the cloudmailing-address
- The request will show up under "recent requests"
- Click on details of the latest request
- Click on actions-> Show curl
- Follow the instructions
- download new .raw file to /backend/tests
- copy the curl command
- replace https:// by http://
- replace address by localhost:5000
Heroku Dashboard -> Select App -> More -> Run console
Upgrade to latest migration
flask db upgrade --directory=/app/backend/migrations/
Upgrade to specific migration
flask db upgrade --directory=/app/backend/migrations/ <revision>
e.g. <revision> = f332352598ee