Created
February 17, 2013 22:08
-
-
Save schmir/4973756 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
# demo file showing how to serve multiple collections under different | |
# paths and replacing the root view | |
# run 'gunicorn -w4 multi_pypi_custom_root:app_public' | |
import pypiserver | |
app_public = pypiserver.app("/home/ralf/packages/private") | |
app_private = pypiserver.app("/home/ralf/packages/public") | |
app_public.mount("/private", app_private) | |
@app_public.route("/") | |
def public_root(): | |
return "hello world" | |
@app_private.route("/") | |
def private_root(): | |
return "secret root" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment