 {Translator} = require './trans'
 {Db}         = require '../common/' + Config.Database.Connector
 
+SStore       = (require 'connect-' + Config.Voicious.Sessions.Connector) Express
 
 # Just implement a _currying_ system, it will be used for routes.
 Function.prototype.curry = () ->


    # Configure the __Express__ instance.
    configure       : () =>
        @app.set 'port', Config.Voicious.Port
        @app.set 'views', Config.Paths.Views
        @app.set 'view engine', 'jade'

        @app.use do Express.bodyParser
        @app.use do Express.methodOverride
        @app.use Express.cookieParser 'your secret here'
        @app.use Express.session {
            secret : 'your secret here',
            store  : sstore
        }
        @app.use @app.router
        @app.use Express.static Config.Paths.Webroot
        do @setAllRoutes
