1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
= Tempura sample
== Summary
* sample.rb - A sample script in README
* template - A script which shows usage of Tempura as a simple template library
* cgi - An example of MVC model WEB application of CGI base
* div - An example of MVC model WEB application of Div/Tofu/WEBrick base
* first - The first, a sample included in Div 1.2.0, rewrited with Tempura::Div
* first_variation - The first which shows usage to mix Div::Div and Tempura::Div
== launch
=== template
cd template
ruby -I../../lib main.rb (en|ja)
And a result is printed.
=== cgi
Modify cgi/app.cgi if it's necessary; e.g. 1st line or path to
tempura. copy or link the cgi directory to apache aware
location. Configure apacheq if necessary.
=== div
cd div
ruby -I../../lib start_app.rb
And open http://localhost:2000/div with web browser.
=== first
cd first
ruby -I../../lib tofu-runner.rb
And open http://localhost:2000/div with web browser.
=== first_variable
cd first_variation
ruby -I../../lib tofu-runner.rb # => print usage
ruby -I../../lib tofu-runner.rb {erb|tempura} {erb|tempura}
And open http://localhost:2000/div with web browser.
e.g. erb based BaseDiv, and tempura based SumDiv
ruby -I../../lib tofu-runner.rb erb tempura
e.g. tempura based BaseDiv, and erb based SumDiv
ruby -I../../lib tofu-runner.rb tempura erb
|