liyad-lisp-pkg-example

0.0.6 • Public • Published

liyad-lisp-pkg-example

NPM package example for Liyad Lisp interpreter CLI.

Install

$ npm install -g liyad-cli
 
$ mkdir myapp
cd myapp
$ npm install liyad-lisp-pkg-example

Write the code

$ vi app.lisp

app.lisp

($let ex ($require "liyad-lisp-pkg-example"))
 
;; Benchmarks
($console-log (::ex:tarai 12 6 0))
($console-log (::ex:fib 10))
($console-log (::ex:fac 10))
 
;; Run the web server on port 3000.
($let url ($node-require "url"))
 
(::ex:#get "/" (-> (req res)
    ($let u (::url:parse ::req:url))
    (::res@writeHead 200 (# (Content-Type "text/html")))
    (::res@end ($concat "hit / ," ::req:method "," ::u:path)) ) )
 
(::ex:serve 3000) ($last "start server")

Run

$ liyad app.lisp
 
12
55
3628800
start server

Package Sidebar

Install

npm i liyad-lisp-pkg-example

Weekly Downloads

2

Version

0.0.6

License

ISC

Unpacked Size

5.36 kB

Total Files

7

Last publish

Collaborators

  • shellyln