Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
With clackup instead of a thread
  • Loading branch information
daninus14 authored Sep 17, 2024
1 parent bc87f68 commit fc32432
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,21 @@ Note the following:
(declare (ignore env))
'(200 () ("Hello from Woo"))))
(defvar *clack-server*
(clack:clackup *woo-app*
:server :woo
;; :address "0.0.0.0"
:port 80
:debug NIL))
```

(defun woo-thread-function ()
(woo:run *woo-app*))
**Note:** By default the address is only `localhost`/`127.0.0.1`, if you uncomment the line above and set it to `0.0.0.0` it will accept connections from anywhere.

(defvar *woo-thread* (bt2:make-thread #'woo-thread-function))
```
To stop the server do:

To stop the server you can kill the thread `(bt2:destroy-thread *woo-thread*)`
```common-lisp
(clack:stop *clack-server*)
```

**Note**: There is a function `(woo:run server)`, however, I don't know where we get the server variable to pass it in.

Expand Down

0 comments on commit fc32432

Please # to comment.