Created
          November 8, 2011 18:03 
        
      - 
      
 - 
        
Save jordanorelli/1348564 to your computer and use it in GitHub Desktop.  
    brubeck project structure concept
  
        
  
    
      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
    
  
  
    
  | static_dir = Dir( | |
| base='static/', | |
| index_file='index.html', | |
| default_ctype='text/plain' | |
| ) | |
| brubeck_handler = Handler( | |
| send_spec='ipc://run/mongrel2_send', | |
| send_ident='039eba8a-e879-40fc-9d33-52afb318d4bc', | |
| recv_spec='ipc://run/mongrel2_recv', | |
| recv_ident='' | |
| ) | |
| brubeck_host = Host( | |
| name="localhost", | |
| routes={ | |
| '/robots.txt': static_dir, | |
| '/favicon.ico': static_dir, | |
| '/static/': static_dir, | |
| '/': brubeck_handler}) | |
| main = Server( | |
| uuid="18edeac7-6acf-4733-bf26-657c9e13e348", | |
| chroot="./", | |
| access_log="/log/access.log", | |
| error_log="/log/error.log", | |
| pid_file="/run/mongrel2.pid", | |
| default_host="localhost", | |
| name="brubeck", | |
| port=6767, | |
| hosts=[brubeck_host] | |
| ) | |
| settings = {"zeromq.threads": 1} | |
| servers = [main] | 
  
    
      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
    
  
  
    
  | . | |
| ├── README | |
| ├── apps | |
| │ └── main.py | |
| ├── conf | |
| │ ├── config.sqlite | |
| │ └── mongrel2.conf | |
| ├── lib | |
| ├── log | |
| │ ├── access.log | |
| │ └── error.log | |
| ├── requirements.txt | |
| ├── run | |
| │ ├── control | |
| │ ├── mongrel2.pid | |
| │ ├── mongrel2_recv | |
| │ └── mongrel2_send | |
| ├── settings.py | |
| ├── static | |
| │ ├── css | |
| │ │ └── style.css | |
| │ └── robots.txt | |
| └── tmp | 
  
    
      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
    
  
  
    
  | import os | |
| import sys | |
| PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) | |
| LIBS_DIR = os.path.join(PROJECT_DIR, 'libs') | |
| sys.path.insert(0, LIBS_DIR) | |
| APP_DIR = os.path.join(PROJECT_DIR, 'apps') | |
| sys.path.insert(0, APP_DIR) | |
| APPS_AVAILABLE = { | |
| 'main': 'main.app', | |
| } | |
| MONGREL2_SETTINGS_FILE = os.path.join(PROJECT_DIR, 'conf/mongrel2.conf') | |
| MONGREL2_DB = os.path.join(PROJECT_DIR, 'conf/config.sqlite') | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment