18 lines
342 B
Python
18 lines
342 B
Python
import os
|
|
import sys
|
|
|
|
|
|
def main(*args):
|
|
from server import Server
|
|
|
|
args = [a for a in args]
|
|
port = args.index('--port') if '--port' in args else -1
|
|
port = int(args[port + 1]) if port >= 0 and port + 1 < len(args) else None
|
|
|
|
Server().serve(port=port)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print(os.getcwd())
|
|
main(*sys.argv)
|