How to use the doccano.server.run_server.IndexHandler function in doccano

To help you get started, we’ve selected a few doccano examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github doccano / doccano / doccano / server / run_server.py View on Github external
def main():
    application = tornado.web.Application([
        url(r'/', IndexHandler, name='index'),
    ],
        template_path=os.path.join(BASE_DIR, 'templates'),
        static_path=os.path.join(BASE_DIR, 'static'),
    )
    http_server = tornado.httpserver.HTTPServer(application)
    port = int(os.environ.get('PORT', 8080))
    http_server.listen(port)
    tornado.ioloop.IOLoop.instance().start()