[ First commit ]

This commit is contained in:
Mateus Cezário Barreto 2025-11-05 17:08:13 -03:00
commit 851303e97b
6 changed files with 167 additions and 0 deletions

25
tonton_web.rb Normal file
View file

@ -0,0 +1,25 @@
require 'gollum/app'
require 'sinatra/flash'
require "sqlite3"
class TonTonWeb < Sinatra::Base
set :host_authorization, { permitted_hosts: ['localhost', 'mytonton.com.br'] }
set :sessions, true
get '/' do
redirect "/home"
end
get '/home' do
markdown File.read('readme.md'), layout_engine: :erb, layout: true
end
get '/building.md' do
markdown File.read('building.md'), layout_engine: :erb, layout: true
end
get '/**.md' do
markdown request.path_info.to_sym
end
end