-
Notifications
You must be signed in to change notification settings - Fork 0
/
shlyfile.lisp
24 lines (20 loc) · 877 Bytes
/
shlyfile.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;; -*- mode: common-lisp -*-
(ql:quickload '(:where-are-we :split-sequence))
(import 'split-sequence:split-sequence)
#+sbcl(setf sb-impl::*default-external-format* :utf-8)
#+sbcl(setf sb-alien::*default-c-string-external-format* :utf-8)
(defun start (&key (port 8080)
; (server :fcgi)
(server :hunchentoot)
(debug nil))
(flet ((start (&rest args)
(apply #'where-are-we:start
:debug debug :server server args)))
(let ((server-starter-port (asdf::getenv "SERVER_STARTER_PORT")))
(if server-starter-port
(destructuring-bind (port fd)
(split-sequence #\=
(car (split-sequence #\; server-starter-port :count 1)))
(start :port (parse-integer port)
:fd (parse-integer fd)))
(start :port port)))))