blob: d5c61b66bdd78d4ef4d675eb8309b0dfa492da10 (
plain) (
tree)
|
|
(ql:quickload "jsonrpc")
(require "jsonrpc")
(defun main ()
(let ((server (jsonrpc:make-server)))
(jsonrpc:expose server "subtract" (lambda (args)
(- (gethash "l" args) (gethash "r" args))))
(jsonrpc:expose server "add" (lambda (args)
(+ (gethash "l" args) (gethash "r" args))))
(jsonrpc:expose server "quit" (lambda (args) (quit)))
(jsonrpc:server-listen server :port 8192 :mode :tcp)))
|