mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2026-05-30 00:49:40 +00:00
Make a great run.py
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
from . import *
|
||||
from . import routes
|
||||
|
||||
1
app/static/coffees/main.coffee
Normal file
1
app/static/coffees/main.coffee
Normal file
@@ -0,0 +1 @@
|
||||
console.log 'main js file loaded'
|
||||
@@ -1,24 +1,5 @@
|
||||
# Require any additional compass plugins here.
|
||||
|
||||
# Set this to the root of your project when deployed:
|
||||
http_path = "/"
|
||||
css_dir = "stylesheets"
|
||||
sass_dir = "sass"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "javascripts"
|
||||
|
||||
# You can select your preferred output style here (can be overridden via the command line):
|
||||
# output_style = :expanded or :nested or :compact or :compressed
|
||||
|
||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
||||
# relative_assets = true
|
||||
|
||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
||||
# line_comments = false
|
||||
|
||||
|
||||
# If you prefer the indented syntax, you might want to regenerate this
|
||||
# project again passing --syntax sass, or you can uncomment this:
|
||||
# preferred_syntax = :sass
|
||||
# and then run:
|
||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
||||
|
||||
BIN
app/static/images/favicon.png
Normal file
BIN
app/static/images/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 699 B |
2
app/static/javascripts/main.js
Normal file
2
app/static/javascripts/main.js
Normal file
@@ -0,0 +1,2 @@
|
||||
// Generated by CoffeeScript 1.6.3
|
||||
console.log('main js file loaded');
|
||||
78
app/static/sass/main.sass
Normal file
78
app/static/sass/main.sass
Normal file
@@ -0,0 +1,78 @@
|
||||
body
|
||||
padding-bottom: 40px
|
||||
color: #5a5a5a
|
||||
|
||||
.navbar-wrapper
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
right: 0
|
||||
z-index: 20
|
||||
.container
|
||||
padding-left: 0
|
||||
padding-right: 0
|
||||
.navbar
|
||||
padding-left: 15px
|
||||
padding-right: 15px
|
||||
|
||||
.carousel
|
||||
height: 500px
|
||||
margin-bottom: 60px
|
||||
|
||||
.carousel-caption
|
||||
z-index: 10
|
||||
|
||||
.carousel .item
|
||||
height: 500px
|
||||
background-color: #777
|
||||
|
||||
.carousel-inner > .item > img
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
min-width: 100%
|
||||
height: 500px
|
||||
|
||||
.marketing
|
||||
padding-left: 15px
|
||||
padding-right: 15px
|
||||
.col-lg-4
|
||||
text-align: center
|
||||
margin-bottom: 20px
|
||||
h2
|
||||
font-weight: normal
|
||||
.col-lg-4 p
|
||||
margin-left: 10px
|
||||
margin-right: 10px
|
||||
|
||||
.featurette-divider
|
||||
margin: 80px 0
|
||||
|
||||
.featurette-heading
|
||||
font-weight: 300
|
||||
line-height: 1
|
||||
letter-spacing: -1px
|
||||
|
||||
@media (min-width: 768px)
|
||||
.marketing
|
||||
padding-left: 0
|
||||
padding-right: 0
|
||||
.navbar-wrapper
|
||||
margin-top: 20px
|
||||
.container
|
||||
padding-left: 15px
|
||||
padding-right: 15px
|
||||
.navbar
|
||||
padding-left: 0
|
||||
padding-right: 0
|
||||
border-radius: 4px
|
||||
.carousel-caption p
|
||||
margin-bottom: 20px
|
||||
font-size: 21px
|
||||
line-height: 1.4
|
||||
.featurette-heading
|
||||
font-size: 50px
|
||||
|
||||
@media (min-width: 992px)
|
||||
.featurette-heading
|
||||
margin-top: 120px
|
||||
File diff suppressed because it is too large
Load Diff
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
124
app/static/stylesheets/main.css
Normal file
124
app/static/stylesheets/main.css
Normal file
@@ -0,0 +1,124 @@
|
||||
/* line 1, ../sass/main.sass */
|
||||
body {
|
||||
padding-bottom: 40px;
|
||||
color: #5a5a5a;
|
||||
}
|
||||
|
||||
/* line 5, ../sass/main.sass */
|
||||
.navbar-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 20;
|
||||
}
|
||||
/* line 11, ../sass/main.sass */
|
||||
.navbar-wrapper .container {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
/* line 14, ../sass/main.sass */
|
||||
.navbar-wrapper .navbar {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* line 18, ../sass/main.sass */
|
||||
.carousel {
|
||||
height: 500px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
/* line 22, ../sass/main.sass */
|
||||
.carousel-caption {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
/* line 25, ../sass/main.sass */
|
||||
.carousel .item {
|
||||
height: 500px;
|
||||
background-color: #777777;
|
||||
}
|
||||
|
||||
/* line 29, ../sass/main.sass */
|
||||
.carousel-inner > .item > img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
min-width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
/* line 36, ../sass/main.sass */
|
||||
.marketing {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
/* line 39, ../sass/main.sass */
|
||||
.marketing .col-lg-4 {
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
/* line 42, ../sass/main.sass */
|
||||
.marketing h2 {
|
||||
font-weight: normal;
|
||||
}
|
||||
/* line 44, ../sass/main.sass */
|
||||
.marketing .col-lg-4 p {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
/* line 48, ../sass/main.sass */
|
||||
.featurette-divider {
|
||||
margin: 80px 0;
|
||||
}
|
||||
|
||||
/* line 51, ../sass/main.sass */
|
||||
.featurette-heading {
|
||||
font-weight: 300;
|
||||
line-height: 1;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* line 57, ../sass/main.sass */
|
||||
.marketing {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
/* line 60, ../sass/main.sass */
|
||||
.navbar-wrapper {
|
||||
margin-top: 20px;
|
||||
}
|
||||
/* line 62, ../sass/main.sass */
|
||||
.navbar-wrapper .container {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
/* line 65, ../sass/main.sass */
|
||||
.navbar-wrapper .navbar {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
/* line 69, ../sass/main.sass */
|
||||
.carousel-caption p {
|
||||
margin-bottom: 20px;
|
||||
font-size: 21px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* line 73, ../sass/main.sass */
|
||||
.featurette-heading {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
/* line 77, ../sass/main.sass */
|
||||
.featurette-heading {
|
||||
margin-top: 120px;
|
||||
}
|
||||
}
|
||||
191
app/templates/_base.jinja2
Normal file
191
app/templates/_base.jinja2
Normal file
@@ -0,0 +1,191 @@
|
||||
{%- from "_utils.jinja2" import static -%}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="shortcut icon" href="{{ static('images/favicon.png') }}">
|
||||
{%- include "_ie.jinja2" -%}
|
||||
|
||||
<title>Apparatus</title>
|
||||
<link href="{{ static('stylesheets/bootstrap/bootstrap.css') }}" rel="stylesheet">
|
||||
<link href="{{ static('stylesheets/main.css') }}" rel="stylesheet">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar-wrapper">
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
<li><a href="#">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li class="dropdown-header">Nav header</li>
|
||||
<li><a href="#">Separated link</a></li>
|
||||
<li><a href="#">One more separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Carousel
|
||||
================================================== -->
|
||||
<div id="myCarousel" class="carousel slide" data-ride="carousel">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="1"></li>
|
||||
<li data-target="#myCarousel" data-slide-to="2"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="item active">
|
||||
<img data-src="holder.js/900x500/auto/#777:#7a7a7a/text:First slide" alt="First slide">
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>Example headline.</h1>
|
||||
<p>Note: If you're viewing this page via a <code>file://</code> URL, the "next" and "previous" Glyphicon buttons on the left and right might not load/display properly due to web browser security rules.</p>
|
||||
<p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img data-src="holder.js/900x500/auto/#666:#6a6a6a/text:Second slide" alt="Second slide">
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>Another example headline.</h1>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img data-src="holder.js/900x500/auto/#555:#5a5a5a/text:Third slide" alt="Third slide">
|
||||
<div class="container">
|
||||
<div class="carousel-caption">
|
||||
<h1>One more for good measure.</h1>
|
||||
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||
<p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="left carousel-control" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
|
||||
<a class="right carousel-control" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
|
||||
</div><!-- /.carousel -->
|
||||
|
||||
|
||||
|
||||
<!-- Marketing messaging and featurettes
|
||||
================================================== -->
|
||||
<!-- Wrap the rest of the page in another container to center all the content. -->
|
||||
|
||||
<div class="container marketing">
|
||||
|
||||
<!-- Three columns of text below the carousel -->
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<img class="img-circle" data-src="holder.js/140x140" alt="Generic placeholder image">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Etiam porta sem malesuada magna mollis euismod. Nullam id dolor id nibh ultricies vehicula ut id elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna.</p>
|
||||
<p><a class="btn btn-default" href="#" role="button">View details »</a></p>
|
||||
</div><!-- /.col-lg-4 -->
|
||||
<div class="col-lg-4">
|
||||
<img class="img-circle" data-src="holder.js/140x140" alt="Generic placeholder image">
|
||||
<h2>Heading</h2>
|
||||
<p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh.</p>
|
||||
<p><a class="btn btn-default" href="#" role="button">View details »</a></p>
|
||||
</div><!-- /.col-lg-4 -->
|
||||
<div class="col-lg-4">
|
||||
<img class="img-circle" data-src="holder.js/140x140" alt="Generic placeholder image">
|
||||
<h2>Heading</h2>
|
||||
<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
|
||||
<p><a class="btn btn-default" href="#" role="button">View details »</a></p>
|
||||
</div><!-- /.col-lg-4 -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
<!-- START THE FEATURETTES -->
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">First featurette heading. <span class="text-muted">It'll blow your mind.</span></h2>
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Oh yeah, it's that good. <span class="text-muted">See for yourself.</span></h2>
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">And lastly, this one. <span class="text-muted">Checkmate.</span></h2>
|
||||
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive" data-src="holder.js/500x500/auto" alt="Generic placeholder image">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<!-- /END THE FEATURETTES -->
|
||||
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer>
|
||||
<p class="pull-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2013 Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
|
||||
</footer>
|
||||
|
||||
</div><!-- /.container -->
|
||||
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
|
||||
<script src="{{ static('javascripts/bootstrap.min.js') }}"></script>
|
||||
<script src="{{ static('javascripts/main.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
8
app/templates/_ie.jinja2
Normal file
8
app/templates/_ie.jinja2
Normal file
@@ -0,0 +1,8 @@
|
||||
<!-- Just for debugging purposes. Don't actually copy this line! -->
|
||||
<!--[if lt IE 9]><script src="http://getbootstrap.com/docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
|
||||
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
3
app/templates/_utils.jinja2
Normal file
3
app/templates/_utils.jinja2
Normal file
@@ -0,0 +1,3 @@
|
||||
{% macro static(fn) %}
|
||||
{{ url_for('static', filename=fn) }}
|
||||
{% endmacro %}
|
||||
1
app/templates/index.jinja2
Normal file
1
app/templates/index.jinja2
Normal file
@@ -0,0 +1 @@
|
||||
{%- extends "_base.jinja2" -%}
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
sass-convert -R -F scss -T sass ext/sass-bootstrap/lib project/static/sass
|
||||
cp -vf ext/sass-bootstrap/dist/js/bootstrap.min.js project/static/javascripts/
|
||||
cp -vf ext/sass-bootstrap/dist/fonts/glyphicons-halflings-regular.* project/static/fonts/
|
||||
sass-convert -R -F scss -T sass ext/sass-bootstrap/lib app/static/sass/bootstrap
|
||||
cp -vf ext/sass-bootstrap/dist/js/bootstrap.min.js app/static/javascripts/
|
||||
cp -vf ext/sass-bootstrap/dist/fonts/glyphicons-halflings-regular.* app/static/stylesheets/fonts/
|
||||
|
||||
3
requirements-dev.txt
Normal file
3
requirements-dev.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
wdb
|
||||
log_colorizer
|
||||
wsreload
|
||||
40
run.py
40
run.py
@@ -1,2 +1,38 @@
|
||||
from app import app
|
||||
app.run(debug=True)
|
||||
from multiprocessing import Process
|
||||
from subprocess import call
|
||||
from glob import glob
|
||||
|
||||
|
||||
class CompassWatch(Process):
|
||||
daemon = True
|
||||
|
||||
def run(self):
|
||||
call(['compass', 'watch', 'app/static'])
|
||||
|
||||
|
||||
class CoffeeScript(Process):
|
||||
daemon = True
|
||||
|
||||
def run(self):
|
||||
call(['coffee',
|
||||
'-wcb',
|
||||
'-j', 'app/static/javascripts/main.js'] +
|
||||
glob('app/static/coffees/*.coffee'))
|
||||
|
||||
|
||||
class Server(Process):
|
||||
daemon = True
|
||||
|
||||
def run(self):
|
||||
call(['python', 'serve.py'])
|
||||
|
||||
|
||||
print('Lauching compass')
|
||||
CompassWatch().start()
|
||||
|
||||
print('Lauching coffee')
|
||||
CoffeeScript().start()
|
||||
|
||||
print('Lauching server')
|
||||
server = Server()
|
||||
server.start()
|
||||
|
||||
60
serve.py
Normal file
60
serve.py
Normal file
@@ -0,0 +1,60 @@
|
||||
import logging
|
||||
|
||||
host = 'apparatus.l'
|
||||
port = 2001
|
||||
url = "http://%s:%d/*" % (host, port)
|
||||
|
||||
try:
|
||||
from wdb.ext import add_w_builtin
|
||||
add_w_builtin()
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from app import app
|
||||
try:
|
||||
from log_colorizer import make_colored_stream_handler
|
||||
handler = make_colored_stream_handler()
|
||||
handler.setLevel(logging.DEBUG)
|
||||
|
||||
del app.logger.handlers[:]
|
||||
app.logger.addHandler(handler)
|
||||
app.logger.setLevel(logging.DEBUG)
|
||||
|
||||
import werkzeug
|
||||
werkzeug._internal._log(
|
||||
'debug', 'Need to log something before deleting handler -_-')
|
||||
del logging.getLogger('werkzeug').handlers[:]
|
||||
logging.getLogger('werkzeug').addHandler(handler)
|
||||
except:
|
||||
print('log colorizer not found')
|
||||
|
||||
werkzeug_debugger = True
|
||||
try:
|
||||
from wdb.ext import WdbMiddleware
|
||||
except ImportError:
|
||||
app.logger.debug('wdb not found')
|
||||
else:
|
||||
app.wsgi_app = WdbMiddleware(app.wsgi_app, start_disabled=True)
|
||||
werkzeug_debugger = False
|
||||
|
||||
try:
|
||||
from wsreload.client import monkey_patch_http_server, watch
|
||||
except ImportError:
|
||||
app.logger.debug('wsreload not found')
|
||||
else:
|
||||
def log(httpserver):
|
||||
app.logger.debug('WSReloaded after server restart')
|
||||
monkey_patch_http_server({'url': url}, callback=log)
|
||||
app.logger.debug('HTTPServer monkey patched for url %s' % url)
|
||||
|
||||
files = ['app/static/javascripts/*',
|
||||
'app/static/stylesheets/*',
|
||||
'app/templates/*']
|
||||
watch({'url': url}, files, unwatch_at_exit=True)
|
||||
|
||||
app.run(
|
||||
debug=True,
|
||||
host=host,
|
||||
port=port,
|
||||
use_debugger=werkzeug_debugger,
|
||||
threaded=True)
|
||||
Reference in New Issue
Block a user