Ohm icon indicating copy to clipboard operation
Ohm copied to clipboard

Tutorial fixes

Open mathom opened this issue 11 years ago • 0 comments

Hey, I've been going through your tutorial and hit a few bumps. I'll probably update this with more stuff as I get further along. I also had to make a tweak to get it to work on the latest Batteries (see https://github.com/mathom/Ohm/commit/5cda519dc35c92a859bf48f77a4b85e3655a811b, I can make a PR if you want).

Page http://ohm-framework.com/tutorials/install The sudo lines should probably be something like:

sudo sh -c "ohm vhost apache > /etc/apache2/sites-available/ice-cream" 

Otherwise the pipe gets stuck if you're not already root.

Page http://ohm-framework.com/tutorials/action

let hello = O.register "hello" Action.Args.(r string) 
  (fun req res -> 
    let greeting = "Hello, " ^ request # args ^ "!" in  (* <=== should be "req" not "request" *)
    return (Action.json [ "greeting", Json.String greeting ] res))

mathom avatar Nov 07 '13 07:11 mathom