I have followed all the steps in the cl-cookbook. I created a webapp project with quickprojects.
I have my .asd
file:
(asdf:defsystem #:serve
:description "Describe server here"
:author "Your Name <your.name@example.com>"
:license "Specify license here"
:version "0.0.1"
:serial t
:depends-on (#:hunchentoot)
:components ((:file "package")
(:file "serve"))
:build-operation "program-op" ;; leave as is
:build-pathname "serve"
:entry-point "serve:main")
I have the lisp server file:
(ql:quickload "serve")
(in-package #:serve)
(defvar *acceptor* (make-instance 'hunchentoot:easy-acceptor :port 4242
:document-root #p"www/"))
;; start the server
(defun main ()
(hunchentoot:start *acceptor*))
(setf (hunchentoot:acceptor-document-root *acceptor*) #p"./www/")
I have the package.lisp file:
(defpackage #:serve
(:use #:cl)
(:export main))
Finally, I have the make file for creating the executable:
build:
sbcl \
--eval '(load "serve.asd")' \
--eval '(ql:quickload "serve")' \
--eval "(asdf:make :serve)" \
--eval '(quit)'
When the executable comes out after running make build, and I run it with ./serve
.... nothing happens.
My expectation is that the server will run as it does when i run it with emacs.
My goal is to send the executable to the server to run it. Not sure if that is the best deploy process. But at the moment, it's good enough for testing.
Even more worrying is that when I send the executable to my ubuntu server, i get a zsh error. This only happens when I build it on my MacOs and send it to ubuntu. However, when I build on ubuntu (i rebuilt the project on the VM to test it), the executable does nothing.