psychobunny 12 years ago
commit b762ec275e

@ -1,11 +1,17 @@
var config = {
"base_url": "http://localhost",
"port": 4567,
"url": undefined, // Leave this alone
"mailer": {
host: 'localhost',
port: '25',
from: 'mailer@localhost.lan'
},
"redis": {
port: "6379",
host: "127.0.0.1",
options: {
}
}
}

@ -3,7 +3,8 @@
ERROR_LOGS = true,
redis = require('redis'),
db = redis.createClient();
config = require('../config.js'),
db = redis.createClient(config.redis.port, config.redis.host, config.redis.options);
// todo (holy cow): append,auth,bgrewriteaof,bgsave,bitcount,bitop,blpop,brpop,brpoplpush,client kill,client list,client getname,client setname,config get,config set,config resetstat,dbsize,debug object,debug segfault,decrby,discard,dump,echo,eval,evalsha,exec,exists,expireat,flushall,flushdb,getbit,getrange,getset,hdel,hexists,hget,hgetall,hincrby,hincrbyfloat,hkeys,hlen,hmget,hmset,hset,hsetnx,hvals,incrby,incrbyfloat,info,lastsave,lindex,linsert,llen,lpop,lpushx,lrem,lset,ltrim,migrate,monitor,move,mset,msetnx,object,persist,pexpire,pexpireat,ping,psetex,psubscribe,pttl,publish,punsubscribe,quit,randomkey,rename,renamenx,restore,rpop,rpoplpush,rpush,rpushx,sadd,save,scard,script exists,script flush,script kill,script load,sdiff,sdiffstore,select,setbit,setex,setnx,setrange,shutdown,sinter,sinterstore,sismember,slaveof,slowlog,smembers,smove,sort,spop,srandmember,srem,strlen,subscribe,sunion,sunionstore,sync,time,ttl,type,unsubscribe,unwatch,watch,zadd,zcard,zcount,zincrby,zinterstore,zrange,zrangebyscore,zrank,zrem,zremrangebyrank,zremrangebyscore,zrevrange,zrevrangebyscore,zrevrank,zscore,zunionstore
// done: get, set, incr, decr, del, mget, multi, expire, lpush, lrange, keys

@ -3,7 +3,9 @@ var express = require('express'),
server = require('http').createServer(WebServer),
RedisStore = require('connect-redis')(express),
path = require('path'),
config = require('../config.js');
config = require('../config.js'),
redis = require('redis'),
redisServer = redis.createClient(config.redis.port, config.redis.host, config.redis.options);
(function(app) {
var templates = global.templates;
@ -24,6 +26,7 @@ var express = require('express'),
app.use(express.compress());
app.use(express.session({
store: new RedisStore({
client: redisServer,
ttl: 60*60*24*14
}),
secret: 'nodebb',

Loading…
Cancel
Save