Skip to content

Instantly share code, notes, and snippets.

@mmerickel
Last active June 27, 2019 22:24
Show Gist options
  • Save mmerickel/ddcd86d3603979cac279d228e08716ce to your computer and use it in GitHub Desktop.
Save mmerickel/ddcd86d3603979cac279d228e08716ce to your computer and use it in GitHub Desktop.
import plaster
import sys
def main():
if '--reload' in sys.argv:
import hupper
reloader = hupper.start_reloader(__name__ + '.main')
reloader.watch_files(['site.ini'])
loader = plaster.get_loader('site.ini', protocols=['wsgi'])
loader.setup_logging()
server_runner = loader.get_wsgi_server()
app = loader.get_wsgi_app()
server_runner(app)
@pauleveritt
Copy link

That's really succinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment