mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-13 08:01:20 +01:00
added options.rb where (for now only) RACK_ENV is defined
This commit is contained in:
parent
9f2ea4913d
commit
52e8f2fd92
3 changed files with 6 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'json'
|
||||
|
||||
Bundler.require( :default, :development ) # require tout les gems définis dans Gemfile
|
||||
Bundler.require( :default, ENV[ 'RACK_ENV' ].to_sym ) # require tout les gems définis dans Gemfile
|
||||
|
||||
require_relative './lib/ledger'
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# encoding: utf-8
|
||||
|
||||
require_relative 'config/options'
|
||||
require_relative './app'
|
||||
|
||||
configure :development do
|
||||
Sinatra::Application.reset!
|
||||
use Rack::Reloader
|
||||
end
|
||||
|
||||
use Rack::Rewrite do
|
||||
rewrite %r{^/(.*(css|js|ttf|woff|html|png|jpg|jpeg|gif)$)}, '/app/$1'
|
||||
end
|
||||
|
|
3
config/options.rb
Normal file
3
config/options.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
# encoding: utf-8
|
||||
|
||||
ENV[ 'RACK_ENV' ] = 'development'
|
Loading…
Reference in a new issue