MCPcopy Index your code
hub / github.com/su-kaka/gcli2api / get_server_port

Function get_server_port

config.py:215–230  ·  view source on GitHub ↗

Get server port setting. Environment variable: PORT Database config key: port Default: 7861

()

Source from the content-addressed store, hash-verified

213
214
215async def get_server_port() -> int:
216 """
217 Get server port setting.
218
219 Environment variable: PORT
220 Database config key: port
221 Default: 7861
222 """
223 env_value = os.getenv("PORT")
224 if env_value:
225 try:
226 return int(env_value)
227 except ValueError:
228 pass
229
230 return int(await get_config_value("port", 7861))
231
232
233async def get_api_password() -> str:

Callers 1

_runFunction · 0.90

Calls 1

get_config_valueFunction · 0.85

Tested by

no test coverage detected