Skip to content

Instantly share code, notes, and snippets.

View XxxUNIXxxX's full-sized avatar

Roman Lashchenkov XxxUNIXxxX

  • SPS Commerce
  • Kiev
View GitHub Profile
@XxxUNIXxxX
XxxUNIXxxX / app.py
Last active August 29, 2015 14:16 — forked from ayang/app.py
class Application(tornado.web.Application):
def __init__(self):
tornado.web.Application.__init__(self, handlers, **settings)
self.db_session = db_session
self.redis = redis.StrictRedis()
self.session_store = RedisSessionStore(self.redis)
class BaseHandler(tornado.web.RequestHandler):
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Diego Garcia'
import tornado.web
import tornado.ioloop
import oauth2.tokengenerator
import oauth2.grant
import oauth2.store.redisdb
import oauth2.store.mongodb
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}