Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Crash course happstack

Name: Anonymous 2011-10-07 2:36

running through happstack crash course.
time to do something, /prog/
no more sitting on your ass and slacking off!
join me and post results.

http://happstack.com/docs/crashcourse/index.html

Name: Anonymous 2011-10-07 2:53

>>1 (Cont)

first thing is probably getting everything installed and ready for coding.

google'd for my installation instructions (ubuntu), seems pretty straightforward.
okay there's no haskell platform for ubuntu
installing ghc and a heap of libraries, ugh, installing cabal... updating $PATH... upgrading cabal-install... shit takes forever. ok done. cabal install happstack works from the first or second try.

create a new directory, create a new ``GNU screen'' window and make watch.sh to run during development:


while true;
do
  # run the program
  runhaskell $1 &
  until nc -z localhost 8000; do :; done; 

  # open a browser
  firefox -remote "openurl(http://localhost:8000)"

  # listen for changes to the source code
  inotifywait -q -q -e modify $1

  # kill the program
  killall ghc
  while nc -z localhost 8000; do :; done; 
done


I create a file called server.hs and start editing it in another window (with vi).
then i start ./watch server.hs
everything seems to work

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List