Skip to content

Commit cb0b1bf

Browse files
committedMay 20, 2016
server for app
1 parent d837ba0 commit cb0b1bf

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
 

‎runserver.py

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
3+
from __future__ import unicode_literals
4+
5+
import sys
6+
import argparse
7+
8+
from FaceDetection.app import app
9+
10+
parser = argparse.ArgumentParser(description="FaceDetection")
11+
parser.add_argument(
12+
"--port", "-p",
13+
type=int,
14+
help="Port to listen on",
15+
default=3000,
16+
)
17+
args = parser.parse_args()
18+
19+
if __name__ == '__main__':
20+
flask_options = dict(
21+
host='127.0.0.1',
22+
debug=True,
23+
port=args.port,
24+
threaded=True,
25+
)
26+
27+
app.run(**flask_options)

0 commit comments

Comments
 (0)