How do I start Hunchentoot on a project? I looked over Edi Weitz's guide and everything went smoothly until after installation. The listed tutorials were either broken or skimmed over actual server usage.
I have my asdf file, installed dependencies with quicklisp, and set up a dispatch table. How do I get Hunchentoot to work with this stuff?
To update, I've improved upon Svante's answer:
(defun start-server ()
(stop-server)
(start (setf *acceptor*
(make-instance 'easy-acceptor
:port 4242))))
(defun stop-server ()
(when *acceptor*
(when started-p *acceptor*
(stop *acceptor*))))
Prior to starting the server, acceptor is nil. After the server has been started (even if it has subsequently been stopped) it is no longer nil. The started-p test checks to see if an initialized easy-acceptor is started. If you try to stop an already stopped acceptor, you receive an error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With