python – How to run a flask project with custome domain names

I am new to flask and am practicing on it but I have a problem
I have a flask object with name api that I set api.config("SERVER_NAME")="callofvoid.void:5000"
and a hosts file in path my_api/etc/hosts
but when I run my code in path my_api/api.py
I get this error:

 * Environment: development
 * Debug mode: on
Traceback (most recent call last):
  File "/storage/emulated/0/pythonfiles/my_api/api.py", line 59, in <module>
    api.run()
  File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/flask/app.py", line 990, in run
    run_simple(host, port, self, **options)
  File "/data/data/com.termux/files/usr/lib/python3.9/site-packages/werkzeug/serving.py", line 1030, in run_simple
    s.bind(server_address)
socket.gaierror: (Errno 7) No address associated with hostname```

**Note: I run my code offline in Termux **
would you please help me to run code with costume domain in local?