# -*- coding: utf-8 -*- # Simple template example used to instantiate a new biothing API from biothings.www.index_base import main, options from www.settings import BioreelWebSettings # Instantiate settings class to configure biothings web web_settings = BioreelWebSettings(config='config') if __name__ == '__main__': # set debug level on app settings web_settings.set_debug_level(options.debug) main(web_settings.generate_app_list(), app_settings={"static_path": web_settings.STATIC_PATH}, sentry_client_key=web_settings.SENTRY_CLIENT_KEY)
# -*- coding: utf-8 -*- # Simple template example used to instantiate a new biothing API import sys import os.path src_path = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] if src_path not in sys.path: sys.path.append(src_path) from biothings.www.index_base import main from www.api.handlers import return_applist if __name__ == '__main__': main(return_applist())
# -*- coding: utf-8 -*- # Simple template example used to instantiate a new biothing API from biothings.www.index_base import main, options from www.settings import MyGeneWebSettings # Instantiate settings class to configure biothings web web_settings = MyGeneWebSettings(config='config') if __name__ == '__main__': # set debug level on app settings web_settings.set_debug_level(options.debug) main(web_settings.generate_app_list(), debug_settings={"STATIC_PATH": web_settings.STATIC_PATH}, sentry_client_key=web_settings.SENTRY_CLIENT_KEY)
#TODO: what is v2a ? (r"/v2a/metadata", MyGeneMetaDataHandler), (r"/metadata/fields", MyGeneFieldsHandler), (r"/demo/?$", DemoHandler), ] APP_LIST += add_apps('', api_app_list) APP_LIST += add_apps(API_VERSION, api_app_list) #APP_LIST += add_apps('demo', demo_app_list) #APP_LIST += add_apps('v2a', api_v2_async_app_list) #APP_LIST += add_apps('auth', auth_app_list) if options.debug: APP_LIST += [ #/widget/* static path (r"/widget/(.*)", tornado.web.StaticFileHandler, { 'path': os.path.join(btsettings.static_path, 'widget') }), #this should be the last one (r"/?(.*)", tornado.web.StaticFileHandler, { 'path': DOCS_STATIC_PATH }), ] # TODO: in config ? (prod = wsgi app) if __USE_WSGI__: import tornado.wsgi wsgi_app = tornado.wsgi.WSGIApplication(APP_LIST) if __name__ == '__main__': main(APP_LIST)
(r"/v2a/metadata", MyGeneMetaDataHandler), (r"/metadata/fields", MyGeneFieldsHandler), (r"/demo/?$", DemoHandler), ] APP_LIST += add_apps('', api_app_list) APP_LIST += add_apps(API_VERSION, api_app_list) #APP_LIST += add_apps('demo', demo_app_list) #APP_LIST += add_apps('v2a', api_v2_async_app_list) #APP_LIST += add_apps('auth', auth_app_list) if options.debug: APP_LIST += [ #/widget/* static path (r"/widget/(.*)", tornado.web.StaticFileHandler, {'path': os.path.join(btsettings.static_path, 'widget')}), #this should be the last one (r"/?(.*)", tornado.web.StaticFileHandler, {'path': DOCS_STATIC_PATH}), ] # TODO: in config ? (prod = wsgi app) if __USE_WSGI__: import tornado.wsgi wsgi_app = tornado.wsgi.WSGIApplication(APP_LIST) if __name__ == '__main__': main(APP_LIST)
# -*- coding: utf-8 -*- # Simple template example used to instantiate a new biothing API from biothings.www.index_base import main, options from www.settings import MySpeciesWebSettings # Instantiate settings class to configure biothings web web_settings = MySpeciesWebSettings(config='config') if __name__ == '__main__': # set debug level on app settings web_settings.set_debug_level(options.debug) main(web_settings.generate_app_list(), debug_settings={"STATIC_PATH": web_settings.STATIC_PATH}, sentry_client_key=web_settings.SENTRY_CLIENT_KEY)
# -*- coding: utf-8 -*- # Simple template example used to instantiate a new biothing API import sys import os.path src_path = os.path.split(os.path.split(os.path.abspath(__file__))[0])[0] if src_path not in sys.path: sys.path.append(src_path) from biothings.www.index_base import main, get_app from www.api.handlers import return_applist if __name__ == '__main__': main(return_applist())