"""Call this to start the application."""
from sys import exit as sys_exit
from os import environ
-from plomtask.misc import HandledException
+from plomtask.exceptions import HandledException
from plomtask.http import TaskHandler, TaskServer
from plomtask.db import DatabaseFile
PLOMTASK_DB_PATH = environ.get('PLOMTASK_DB_PATH')
HTTP_PORT = 8082
-TEMPLATES_DIR = 'templates'
DB_CREATION_ASK = 'Database file not found. Create? Y/n\n'
else:
print('Not recognizing reply as "yes".')
raise HandledException('Cannot run without database.')
- server = TaskServer(TEMPLATES_DIR, db_file,
- ('localhost', HTTP_PORT), TaskHandler)
+ server = TaskServer(db_file, ('localhost', HTTP_PORT), TaskHandler)
print(f'running at port {HTTP_PORT}')
try:
server.serve_forever()