Guest User

Untitled

a guest
Jan 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/usr/bin/env rackup
  2. require 'ramaze'
  3.  
  4. class MainController < Ramaze::Controller
  5. map '/'
  6.  
  7. def index
  8. return "Hello #{session[:name]}"
  9. end
  10.  
  11. def set
  12. session[:name] = 'Ruby'
  13. end
  14. end
  15.  
  16. Ramaze::Cache.options.session = Ramaze::Cache::MemCache
  17.  
  18. Ramaze.start(
  19. :root => Ramaze.options.roots,
  20. :started => true,
  21. :port => Ramaze::Adapter.options.port
  22. )
  23.  
  24. run Ramaze
Add Comment
Please, Sign In to add comment