File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,8 +8,9 @@ Install Postgres and configure `SQLALCHEMY_DATABASE_URI` in `core/settings.py`
88
99```
1010pip3 install -r requirements.txt
11- python3 migrate.py // once to create database entries required
12- python3 app.py
11+ python3 migrate.py # Run once to create database entries required
12+ python3 app.py # Testing Environment
13+ gunicorn -b 0.0.0.0:9090 app:app # Production Environment
1314```
1415
1516This will run NodeJsScan on ` http://0.0.0.0:9090 `
Original file line number Diff line number Diff line change @@ -55,5 +55,7 @@ def __repr__(self):
5555 """repr"""
5656 return '<Results %r>' % self .scan_hash
5757
58- Base .metadata .create_all (bind = engine )
59- print ("[INFO] Table entries created!" )
58+
59+ if __name__ == '__main__' :
60+ Base .metadata .create_all (bind = engine )
61+ print ("[INFO] Table entries created!" )
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ jinja2==2.10
33jsbeautifier == 1.7.5
44psycopg2-binary == 2.7.5
55sqlalchemy == 1.2.10
6+ gunicorn == 19.9.0
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ setsid docker-entrypoint.sh postgres >/dev/fd/1 2>&1 < /dev/fd/1 &
33
44sleep 10
55python3 migrate.py
6- python3 app.py
6+ gunicorn -b 0.0.0.0:9090 app:app
You can’t perform that action at this time.
0 commit comments