Browse Source

Set up Hello World server.

* genenetwork.asd, genenetwork.lisp, run.lisp: New files.
* guix.scm: Import (gnu packages lisp-xyz). Add sbcl-hunchentoot to
manifest.
main
Arun Isaac 5 months ago
parent
commit
966c7c7d0f
Signed by untrusted user: arunisaac GPG Key ID: 2E25EE8B61802BB3
  1. 7
      genenetwork.asd
  2. 15
      genenetwork.lisp
  3. 5
      guix.scm
  4. 13
      run.lisp

7
genenetwork.asd

@ -0,0 +1,7 @@
(defsystem :genenetwork
:class :package-inferred-system
:description "GeneNetwork"
:version "0.1.0"
:author "The GeneNetwork team"
:license "GNU Affero General Public License version 3 or later"
:depends-on (:genenetwork/genenetwork))

15
genenetwork.lisp

@ -0,0 +1,15 @@
(defpackage :genenetwork
(:use :common-lisp :hunchentoot)
(:export :main))
(in-package :genenetwork)
(hunchentoot:define-easy-handler (home :uri "/") ()
(setf (hunchentoot:content-type*) "text/plain; charset=utf-8")
"Hello World!")
(defvar *acceptor*
(make-instance 'hunchentoot:easy-acceptor :port 8080))
(defun main ()
(hunchentoot:start *acceptor*))

5
guix.scm

@ -1,4 +1,5 @@
(use-modules (gnu packages lisp))
(use-modules (gnu packages lisp)
(gnu packages lisp-xyz))
(packages->manifest
(list sbcl))
(list sbcl sbcl-hunchentoot))

13
run.lisp

@ -0,0 +1,13 @@
(require :asdf)
;; Load genenetwork.asd from the current directory.
(asdf:load-asd (merge-pathnames #P"genenetwork.asd"
(directory-namestring *load-truename*)))
;; Load the genenetwork system and start the web server
(asdf:load-system :genenetwork)
(genenetwork:main)
;; Start the REPL server
(asdf:load-system :slynk)
(slynk:create-server :port 4005)
Loading…
Cancel
Save