Initial Sinatra project structure
This commit is contained in:
9
app/controllers/auth.rb
Normal file
9
app/controllers/auth.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AuthController < Sinatra::Base
|
||||
|
||||
get '/login' do
|
||||
erb :'auth/login', :locals => {
|
||||
:title => 'Login to your account'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
9
app/controllers/index.rb
Normal file
9
app/controllers/index.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class IndexController < Sinatra::Base
|
||||
|
||||
get '/' do
|
||||
erb :index, :locals => {
|
||||
:title => 'Home'
|
||||
}
|
||||
end
|
||||
|
||||
end
|
10
app/settings.rb
Normal file
10
app/settings.rb
Normal file
@ -0,0 +1,10 @@
|
||||
class Sinatra::Base
|
||||
|
||||
configure do
|
||||
enable :sessions
|
||||
|
||||
set :views, './views'
|
||||
set :public_folder, './public'
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user