up static routes
This commit is contained in:
parent
9cca0e4998
commit
1048f4af45
14 changed files with 2959 additions and 1076 deletions
|
@ -7,6 +7,7 @@ It initializes the Falcon application and sets up the routes.
|
|||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import falcon
|
||||
|
||||
# Import utility modules
|
||||
|
@ -41,6 +42,11 @@ def create_app():
|
|||
RateLimitMiddleware()
|
||||
])
|
||||
|
||||
# Add static file serving
|
||||
logger.info("Setting up static file serving")
|
||||
static_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'oedb', 'resources', 'demo', 'static'))
|
||||
app.add_static_route('/static/', static_dir)
|
||||
|
||||
# Check database connection before continuing
|
||||
if not check_db_connection():
|
||||
logger.error("Cannot start server - PostgreSQL database is not responding")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue