0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-02-21 20:36:07 +00:00
alerta_alerta/alerta/api/v2/__init__.py

29 lines
464 B
Python
Raw Normal View History

2013-04-02 13:48:55 +00:00
2013-03-15 17:18:39 +00:00
import sys
2013-02-17 23:56:52 +00:00
from flask import Flask
2013-02-19 10:57:05 +00:00
2013-03-15 17:18:39 +00:00
from alerta.common import config
from alerta.common import log as logging
from alerta.common.mq import Messaging
from alerta.server.database import Mongo
2014-01-31 15:44:56 +00:00
Version = '2.1.0'
2013-03-15 17:18:39 +00:00
LOG = logging.getLogger(__name__)
CONF = config.CONF
2013-10-20 12:00:29 +00:00
config.parse_args(version=Version)
2013-03-15 17:18:39 +00:00
logging.setup('alerta')
2013-02-17 23:56:52 +00:00
app = Flask(__name__)
2013-02-19 10:57:05 +00:00
app.config.from_object(__name__)
2013-03-15 17:18:39 +00:00
db = Mongo()
2013-02-19 10:57:05 +00:00
2013-04-13 21:44:15 +00:00
mq = Messaging()
mq.connect()
2013-02-17 23:56:52 +00:00
import views
import management.views