debian/bullseye
|
Last change
on this file since 67e5a8d was f9321aa, checked in by Joachim Langenbach <joachim.langenbach@…>, 7 years ago |
- Adapted code_generator to
- handle several packages
- to configure the port from yaml specification
- to use the VERSION used by setup.py
- Added deviceservice.yaml with first version of webservice
- Moved Config loader and HttpErrors to gnuboat.common
- Moved rrd archive schema to gnuboat.common.device
|
-
Property mode
set to
100644
|
|
File size:
542 bytes
|
| Line | |
|---|
| 1 | {{#supportPython2}}
|
|---|
| 2 | #!/usr/bin/env python
|
|---|
| 3 | {{/supportPython2}}
|
|---|
| 4 | {{^supportPython2}}
|
|---|
| 5 | #!/usr/bin/env python3
|
|---|
| 6 | {{/supportPython2}}
|
|---|
| 7 |
|
|---|
| 8 | import os
|
|---|
| 9 |
|
|---|
| 10 | from {{packageName}}_impl import (
|
|---|
| 11 | app, application, setup_app, config_object
|
|---|
| 12 | )
|
|---|
| 13 |
|
|---|
| 14 | def main():
|
|---|
| 15 | template_folder = os.path.join(os.path.dirname(__file__), 'templates')
|
|---|
| 16 | setup_app('{{appName}}', config_object, template_folder = template_folder)
|
|---|
| 17 | app.run(host=application.config.get("HOST", "localhost"), port=application.config.get("PORT", {{serverPort}}))
|
|---|
| 18 |
|
|---|
| 19 | if __name__ == '__main__':
|
|---|
| 20 | main()
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.