Skip to content

Commit

Permalink
add a quickstart installer script
Browse files Browse the repository at this point in the history
  • Loading branch information
vii committed Jun 13, 2009
1 parent 53984b8 commit 3079ba5
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions quickstart.lisp
@@ -0,0 +1,33 @@
(in-package #:cl-user)

;;; First ASDF install the dependencies

(eval-when (:compile-toplevel :execute :load-toplevel)
(require 'asdf-install))


(handler-bind (((or asdf-install::key-not-found asdf-install::download-error asdf-install::no-signature)
(lambda(c) (declare (ignore c)) (invoke-restart 'asdf-install::skip-gpg-check))))
(asdf-install:install
'iterate
'cffi
'cl-irregsexp
'trivial-backtrace))

;;; Load tpd2

(eval-when (:compile-toplevel :load-toplevel :execute)
(handler-bind ((error (lambda(c) (declare (ignore c)) (invoke-restart 'CONTINUE))))
(asdf:oos 'asdf:load-op 'teepeedee2)))

;;; Define a /hello page

(tpd2:defpage "/hello" (name) :create-frame nil
(tpd2.ml.html:<h1 "Hello " name))

;;; Start tpd2 listening

(let ((socket (tpd2.io:make-con-listen :port 8080)))
(tpd2.io:launch-io 'tpd2.io:accept-forever socket 'tpd2.http:http-serve))

;;; Visit http://localhost:8080/hello

0 comments on commit 3079ba5

Please sign in to comment.