mhkoji / Vase

A simple image viewer written in Common Lisp and ClojureScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vase

A simple image viewer written in Common Lisp and ClojureScript

sample

Set up

  1. Install imagemagick
$ apt install imagemagick
  1. Install Leiningen

  2. Compile the ClojureScript sources of vase.

$ cd /path/to/vase/vase-webapp
$ make

Run the web server

  1. Create directories to store the data for the server
$ mkdir /tmp/vase
$ mkdir /tmp/vase/thumbnails
  1. Load the lisp files using vase.asd
CL-USER> (ql:quickload :vase-webapp)
  1. Create a configure
CL-USER> (defvar *conf*
           (vase.app.container:make-configure
            :id-generator
            (make-instance 'vase.id:sha256-3)
            :connection-factory
            (make-instance 'proton:sqlite3-factory
                           :db-path "/tmp/vase/db.sqlite3")
            :thumbnail-root "/tmp/vase/thumbnails/"))
  1. Run the server with the configure
CL-USER> (vase.app.web:run :conf *conf*)
  1. Add the sample folders
CL-USER> (ql:quickload :vase-app-cli)
CL-USER> (vase.app.cli:add-folders "./resources/contents/images/" :conf *conf* :initialize-data-p t)

Then, access http://localhost:18888/folders

About

A simple image viewer written in Common Lisp and ClojureScript

License:MIT License


Languages

Language:CSS 57.1%Language:Common Lisp 25.6%Language:Clojure 16.5%Language:Dockerfile 0.6%Language:Shell 0.2%Language:Makefile 0.0%