Local Development and Testing
For local development and testing we recommend using a free tool called ngrok. ngrok allows you to tunnel HTTP requests from MineOS cloud to your local development machine, without worrying about any network configuration.
First, download ngrok by following the instructions for your operating system: https://download.ngrok.com/mac-os
Now start your code so the local endpoint is available and listening to incoming connections. In our example, our endpoint is listening on: http://127.0.0.1:8080/api/dsr-delete-endpoint
* Serving Flask app "app.py" (lazy loading)
* Environment: development
* Debug mode: on
* Running on http://127.0.0.1:8080/api/dsr-delete-endpoint (Press CTRL+C to quit)
Once your local endpoint has started, start ngrok with the required port:
ngrok http 8080
The console output should show something similar to this:
ngrok
Version 3.3.0
Session Status online
Account [email protected] (Plan: Free)
Update update available (version 3.4.0, released 2024-12-12)
Version 3.3.0
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding https://abcdef123456.ngrok.io -> http://localhost:8080
Forwarding http://abcdef123456.ngrok.io -> http://localhost:8080
Connections
-----
No requests to display
Copy the https address under 'forwarding' and use it to configure MineOS Custom Integration.
Click 'Save'. You can now click 'Test integration' any time you want MineOS to send a test request to your endpoint.
Updated 4 days ago