Created
November 2, 2015 04:26
-
-
Save moriyoshi/2eb078e957c3401f8a3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app:main] | |
use = call:server:paster_main | |
[server:main] | |
use = egg:gunicorn#main | |
host = 0.0.0.0 | |
port = 8000 | |
workers = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<p>{{ message }}</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyramid.view import view_config | |
from pyramid.config import Configurator | |
@view_config(route_name='pyspa.index', renderer='index.jinja2') | |
def index(context, request): | |
return {'message':'hello, world!'} | |
def paster_main(global_config, **local_config): | |
settings = dict(global_config, **local_config) | |
config = Configurator(settings=settings) | |
config.include('pyramid_jinja2') | |
config.add_route('pyspa.index', '/') | |
config.scan('.') | |
return config.make_wsgi_app() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment