Skip to content
Snippets Groups Projects
Commit 9e996c00 authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Server default host/port moved to conf file

parent 6d7101e0
No related branches found
No related tags found
No related merge requests found
......@@ -6,4 +6,9 @@ subdirectories = {
'logs': 'logs',
'inbound_images': 'images/inbound',
'outbound_images': 'images/outbound',
}
server_conf = {
'host': '127.0.0.1',
'port': 8000,
}
\ No newline at end of file
......@@ -2,19 +2,21 @@ import argparse
from multiprocessing import Process
import uvicorn
from conf.defaults import server_conf
def parse_args():
parser = argparse.ArgumentParser(
description='Start model server with optional arguments',
)
parser.add_argument(
'--host',
default='127.0.0.1',
default=server_conf['host'],
help='bind socket to this host'
)
parser.add_argument(
'--port',
default='8000',
help='bind socket to this port, default=8000',
default=str(server_conf['port']),
help='bind socket to this port',
)
parser.add_argument(
'--debug',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment