replace python django backend with nodejs backend
This commit is contained in:
17
ai/main.py
Normal file
17
ai/main.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user