-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
44 lines (41 loc) · 1.47 KB
/
main.py
File metadata and controls
44 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# -*- coding: utf-8 -*-
"""
wsgi
~~~~
top level module
"""
# A web application that stores samples from a collection of NFC sensors.
#
# https://github.com/cuplsensor/cuplbackend
#
# Original Author: Malcolm Mackay
# Email: malcolm@plotsensor.com
# Website: https://cupl.co.uk
#
# Copyright (c) 2021. Plotsensor Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the
# GNU Affero General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>.
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from backendapp.api import admin, consumer
from rootapp.rootapp import rootapp
from docs.api.admin.docsapp import docsapp as admin_docsapp
from docs.api.consumer.docsapp import docsapp as consumer_docsapp
import os
app = DispatcherMiddleware(rootapp, {
'/docs/admin': admin_docsapp,
'/docs/consumer': consumer_docsapp,
'/api/admin': admin.create_app(),
'/api/consumer': consumer.create_app()
})