Simple single file app.
This commit is contained in:
parent
79c13a9a38
commit
47de2860ab
2 changed files with 16 additions and 0 deletions
|
|
@ -1,2 +1,3 @@
|
||||||
# roda-templates
|
# roda-templates
|
||||||
|
|
||||||
|
Install prereq: sudo apt install puma, sudo gem install roda --no-document
|
||||||
|
|
|
||||||
15
config.ru
Normal file
15
config.ru
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
require 'roda'
|
||||||
|
|
||||||
|
class App < Roda
|
||||||
|
route do |r|
|
||||||
|
r.root do
|
||||||
|
"<h1>Hello, World!</h1>"
|
||||||
|
end
|
||||||
|
|
||||||
|
r.is String do |name|
|
||||||
|
"<h1>Hello, #{name.capitalize}!</h1>"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
run App
|
||||||
Loading…
Add table
Add a link
Reference in a new issue