This code is a ruby rack sample. This kakabot can answer your questions.