A simple Python Flask bootstrapper
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
681 B

3 years ago
  1. from flask import Flask
  2. from flask_assets import Environment, Bundle
  3. from routes.get import get
  4. # Instantiate Flask
  5. app = Flask(
  6. __name__,
  7. static_folder='static',
  8. static_path='/static',
  9. template_folder='views'
  10. )
  11. # Apply configurations
  12. app.config.from_pyfile('site.cfg')
  13. assets = Environment(app)
  14. #JS/CSS bundlers for minification
  15. js = Bundle('js/site.js', filters='jsmin', output='js/bundle.min.js')
  16. css = Bundle('css/styles.css', filters='cssmin', output='css/bundle.min.css')
  17. assets.register('js_modules', js)
  18. assets.register('css_modules', css)
  19. # Apply GET method routes
  20. app.register_blueprint(get)
  21. # Run application
  22. if __name__ == '__main__':
  23. app.run()