New way to run pynyaata
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a6d8ff2b01
commit
f7b81c0c3b
@ -23,7 +23,7 @@ After a good rewrite in Python, it's time to show it to the public, and here it
|
||||
- Clone this repository
|
||||
- Launch a terminal and move into the root of the cloned repository
|
||||
- Run `pip install -r requirements.txt`
|
||||
- Run `python3 run.py`
|
||||
- Run `python3 run.py` or simply `pynyaata`
|
||||
- The app is accessible at http://localhost:5000
|
||||
|
||||
## Features
|
||||
|
@ -3,7 +3,7 @@ from operator import attrgetter, itemgetter
|
||||
|
||||
from flask import redirect, render_template, request, url_for, abort
|
||||
|
||||
from .config import app, auth, ADMIN_USERNAME, ADMIN_PASSWORD, MYSQL_ENABLED
|
||||
from .config import app, auth, ADMIN_USERNAME, ADMIN_PASSWORD, MYSQL_ENABLED, APP_PORT, IS_DEBUG
|
||||
from .connectors import *
|
||||
from .connectors.core import ConnectorCore, ConnectorLang, ConnectorReturn
|
||||
from .forms import SearchForm, DeleteForm, EditForm
|
||||
@ -175,3 +175,7 @@ def admin_edit(link_id=None):
|
||||
link.vf = False
|
||||
|
||||
return render_template('admin/edit.html', search_form=SearchForm(), link=link, folders=folders, action_form=form)
|
||||
|
||||
|
||||
def run():
|
||||
app.run('0.0.0.0', APP_PORT, IS_DEBUG)
|
||||
|
6
run.py
6
run.py
@ -1,3 +1,5 @@
|
||||
from pynyaata.config import app, APP_PORT, IS_DEBUG
|
||||
#!/usr/bin/env python3
|
||||
from pynyaata import run
|
||||
|
||||
app.run('0.0.0.0', APP_PORT, IS_DEBUG)
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
|
Reference in New Issue
Block a user