run.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. '''
  2. Gestor de nodos para LaOtraRed La Paz - El Alto
  3. Copyright (C) 2017 Rodrigo Garcia
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as
  6. published by the Free Software Foundation, either version 3 of the
  7. License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. '''
  15. from flask import Flask
  16. from gestor.main import app as application
  17. from database.database import init_db, db_session
  18. import gestor.configs as configs
  19. # registrando blueprints
  20. from gestor.views import gestor as gestor_module
  21. application.register_blueprint(gestor_module)
  22. init_db()
  23. application.debug = configs.DEBUG
  24. application.secret_key = configs.SECRET_KEY
  25. if __name__ == '__main__':
  26. application.run(host='0.0.0.0')