Browse Source

Use redis for session storage

master
Dylan Baker 4 years ago
parent
commit
3d277e20af
3 changed files with 16 additions and 0 deletions
  1. 4
    0
      Gemfile
  2. 8
    0
      Gemfile.lock
  3. 4
    0
      web/config.ru

+ 4
- 0
Gemfile View File

21
 gem "sassc", "~> 2.2"
21
 gem "sassc", "~> 2.2"
22
 
22
 
23
 gem "rake", "~> 13.0"
23
 gem "rake", "~> 13.0"
24
+
25
+gem "redis-rack", "~> 2.1"
26
+
27
+gem "rack", "~> 2.2"

+ 8
- 0
Gemfile.lock View File

20
     rack-protection (2.0.8.1)
20
     rack-protection (2.0.8.1)
21
       rack
21
       rack
22
     rake (13.0.1)
22
     rake (13.0.1)
23
+    redis (4.1.3)
24
+    redis-rack (2.1.2)
25
+      rack (>= 2.0.8, < 3)
26
+      redis-store (>= 1.2, < 2)
27
+    redis-store (1.8.2)
28
+      redis (>= 4, < 5)
23
     ruby2_keywords (0.0.2)
29
     ruby2_keywords (0.0.2)
24
     sassc (2.2.1)
30
     sassc (2.2.1)
25
       ffi (~> 1.9)
31
       ffi (~> 1.9)
39
   httparty (~> 0.18.0)
45
   httparty (~> 0.18.0)
40
   nokogiri (~> 1.10)
46
   nokogiri (~> 1.10)
41
   pg (~> 1.2)
47
   pg (~> 1.2)
48
+  rack (~> 2.2)
42
   rake (~> 13.0)
49
   rake (~> 13.0)
50
+  redis-rack (~> 2.1)
43
   sassc (~> 2.2)
51
   sassc (~> 2.2)
44
   sequel (~> 5.30)
52
   sequel (~> 5.30)
45
   sinatra (~> 2.0)
53
   sinatra (~> 2.0)

+ 4
- 0
web/config.ru View File

1
+require 'rack'
2
+require 'rack/session/redis'
1
 require "rubygems"
3
 require "rubygems"
2
 require "sinatra"
4
 require "sinatra"
3
 
5
 
6
+use Rack::Session::Redis
7
+
4
 require '/var/www/vlv-search/web/server.rb'
8
 require '/var/www/vlv-search/web/server.rb'
5
 
9
 
6
 run VLVSearch
10
 run VLVSearch

Loading…
Cancel
Save