summaryrefslogtreecommitdiff
path: root/pecan/scaffolds/rest-api/config.py_tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'pecan/scaffolds/rest-api/config.py_tmpl')
-rw-r--r--pecan/scaffolds/rest-api/config.py_tmpl41
1 files changed, 41 insertions, 0 deletions
diff --git a/pecan/scaffolds/rest-api/config.py_tmpl b/pecan/scaffolds/rest-api/config.py_tmpl
new file mode 100644
index 0000000..bd4d29d
--- /dev/null
+++ b/pecan/scaffolds/rest-api/config.py_tmpl
@@ -0,0 +1,41 @@
+# Server Specific Configurations
+server = {
+ 'port': '8080',
+ 'host': '0.0.0.0'
+}
+
+# Pecan Application Configurations
+app = {
+ 'root': '${package}.controllers.root.RootController',
+ 'modules': ['${package}'],
+ 'debug': True
+}
+
+logging = {
+ 'loggers': {
+ 'root': {'level': 'INFO', 'handlers': ['console']},
+ '${package}': {'level': 'DEBUG', 'handlers': ['console']},
+ 'py.warnings': {'handlers': ['console']},
+ '__force_dict__': True
+ },
+ 'handlers': {
+ 'console': {
+ 'level': 'DEBUG',
+ 'class': 'logging.StreamHandler',
+ 'formatter': 'simple'
+ }
+ },
+ 'formatters': {
+ 'simple': {
+ 'format': ('%(asctime)s %(levelname)-5.5s [%(name)s]'
+ '[%(threadName)s] %(message)s')
+ }
+ }
+}
+
+# Custom Configurations must be in Python dictionary format::
+#
+# foo = {'bar':'baz'}
+#
+# All configurations are accessible at::
+# pecan.conf