mirror of https://github.com/E-Almqvist/hsf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
365 B
24 lines
365 B
#!/usr/bin/ruby
|
|
|
|
require "sinatra"
|
|
require "slim"
|
|
|
|
load "db_parse.rb"
|
|
|
|
db_cache = get_db() # get all the parsed data
|
|
|
|
get "/" do
|
|
slim(:person, locals: {persondata: db_cache})
|
|
end
|
|
|
|
get "/login" do
|
|
slim(:login)
|
|
end
|
|
|
|
get "/userpage" do
|
|
userinfo = {
|
|
username: params[:username],
|
|
password: params[:password]
|
|
}
|
|
slim(:userpage, locals: {userinfo: userinfo})
|
|
end
|
|
|