pluginserver 0.8.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pluginserver
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Plugin-driven API server
5
5
  Home-page: https://github.com/nicciniamh/pluginserver
6
6
  Author: Nicole Stevens
@@ -103,10 +103,24 @@ def main():
103
103
  app.add_routes(routes)
104
104
  app.on_shutdown.append(on_shutdown)
105
105
  if 'documents' in globalCfg.paths:
106
+ """
107
+ if configured set up static page service
108
+ """
106
109
  if ':' in globalCfg.paths.documents:
107
110
  dname, dpath = globalCfg.paths.documents.split(':')
108
111
  else:
109
112
  dname, dpath = 'docs', globalCfg.paths.documents
113
+
114
+ if 'indexfile' in globalCfg.paths:
115
+ indexfile = globalCfg.paths.indexfile
116
+ print(f"indexfile for static service is {indexfile}")
117
+ # Route to handle /docs/ (with or without trailing slash)
118
+ async def default_doc_handler(request):
119
+ return web.FileResponse(os.path.join(dpath, indexfile))
120
+
121
+ app.router.add_get(f'/{dname}', default_doc_handler)
122
+ app.router.add_get(f'/{dname}/', default_doc_handler)
123
+
110
124
  print(f"Setting up static page delivery for {dname} from {dpath}")
111
125
  app.router.add_static(f"/{dname}/", path=dpath, name=dname)
112
126
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pluginserver
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Plugin-driven API server
5
5
  Home-page: https://github.com/nicciniamh/pluginserver
6
6
  Author: Nicole Stevens
@@ -4,7 +4,7 @@ from setuptools import setup
4
4
 
5
5
  setup(
6
6
  name='pluginserver',
7
- version='0.8.0',
7
+ version='0.8.1',
8
8
  packages=['plugincore'],
9
9
  include_package_data=True,
10
10
  description='Plugin-driven API server',
File without changes
File without changes
File without changes
File without changes