Browse Source

Add rake task to run the server

master
Dylan Baker 6 months ago
parent
commit
f257672254
3 changed files with 9 additions and 2 deletions
  1. 3
    0
      .env.example
  2. 6
    0
      Rakefile
  3. 0
    2
      web/server.rb

+ 3
- 0
.env.example View File

@@ -5,3 +5,6 @@ PROD_USERNAME=
5 5
 PROD_HOSTNAME=
6 6
 VLV_USERNAME=
7 7
 VLV_PASSWORD=
8
+SESSION_KEY=
9
+SESSION_DOMAIN=
10
+SESSION_SECRET=

+ 6
- 0
Rakefile View File

@@ -1,5 +1,11 @@
1 1
 require 'dotenv/load'
2 2
 
3
+task 'server' do
4
+  require_relative './web/server'
5
+
6
+  VLVSearch.run!
7
+end
8
+
3 9
 task 'migrate' do
4 10
   require_relative './db/migrate'
5 11
 

+ 0
- 2
web/server.rb View File

@@ -128,6 +128,4 @@ class VLVSearch < Sinatra::Base
128 128
       Truncato.truncate(s, max_length: 500)
129 129
     end
130 130
   end
131
-
132
-  run! if __FILE__ == $0
133 131
 end

Loading…
Cancel
Save