Skip to content

Commit

Permalink
using custom redis.yml (copy default one and adjust to your needs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Wnętrzak committed May 10, 2011
1 parent 570ff19 commit a37c64f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ public/stylesheets/compiled/
.rvmrc
vendor/ruby
db/*.rdb

config/redis.yml
17 changes: 14 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ This is the first version, heavy alpha.

If you are using rvm, create new gemset to not mess with your default gems

2. Run redis (download from http://redis.io/download) - tested on 2.0 and 2.2 stable releases, optionally tweak config/redis.yml
2. Setup Redis

Copy and adjust redis config file:

cp config/redis.yml.example config/redis.yml

Run redis (download from http://redis.io/download) - tested on 2.0 and 2.2 stable releases

3. Run node server (download from http://nodejs.org/#download) - tested on (v0.4.3, v0.4.7)

Expand Down Expand Up @@ -48,17 +54,22 @@ You have been warned!

bundle install

2. Run Redis server instance
2. Setup database number in config/redis.yml or run separate redis server like this:

redis-server config/redis-test.conf

3. Run Node server instance
REDIS_DB should be number that you specified in config/redis.yml

REDIS_DB=1 node app-node/server.js

Eventually you can connect to separate instace of redis server (if running)

REDIS_DB=1 REDIS_PORT=6380 node app-node/server.js

4. Run tests:

rake spec
bundle exec rake spec

== Translations

Expand Down
3 changes: 3 additions & 0 deletions config/redis-test.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# You can start separate redis-server for tests if you want
# Redis configuration file example
# Than run it like this:
# redis-server config/redis-test.conf

dir ./
daemonize no
Expand Down
2 changes: 1 addition & 1 deletion config/redis.yml → config/redis.yml.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
development:
host: "localhost"
db: 0
test:
host: "localhost"
port: 6380
db: 1

0 comments on commit a37c64f

Please sign in to comment.