summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-04-19 14:56:55 +0200
committerWojtek Kosior <koszko@koszko.org>2022-04-19 15:28:09 +0200
commit50f624d2dfec94dee380dee98d4723e41fc4da06 (patch)
tree497aeed38e066c13321471e95947781358b10fb1 /doc
parent21ed4b30355f2e61495d5ba41516988a507ffa76 (diff)
downloadhaketilo-hydrilla-50f624d2dfec94dee380dee98d4723e41fc4da06.tar.gz
haketilo-hydrilla-50f624d2dfec94dee380dee98d4723e41fc4da06.zip
add sample wsgi script
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/hydrilla.wsgi21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/examples/hydrilla.wsgi b/doc/examples/hydrilla.wsgi
new file mode 100644
index 0000000..0a3769b
--- /dev/null
+++ b/doc/examples/hydrilla.wsgi
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+
+# SPDX-License-Identifier: CC0-1.0
+
+# Sample WSGI script for Hydrilla server.
+#
+# Copyright (C) 2022 Wojtek Kosior
+
+# Uncomment the lines below if you want to use a virtualenv installation of
+# Hydrilla.
+
+#from pathlib import Path
+#path = Path('/path/to/virtualenv/bin/activate_this.py')
+#exec(path.read_text(), {'__file__': str(path)})
+
+from hydrilla.server import HydrillaApp, config
+
+# The following line will initialize Hydrilla with the default, internal
+# configuration while also attempting to load /etc/hydrilla/config.json if it's
+# present.
+application = HydrillaApp(config.load())