39
Clojure web application with GraalVM
source link: https://www.tuicool.com/articles/jmiQra2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
A GraalVM Clojure web application:
- Environment: yogthos/config
- HTTP Server: HTTP Kit
- HTML templating: Hiccup
- Resource management: Mount
- Routing: Reitit
- DB: clojure.java.jdbc + Postgres
Requirements
Usage
Set you database connection in the config.edn
file, e.g:
{:db {:dbtype "postgres" :dbname "myapp_dev" :host "localhost" :port 5432 :user "db_user_name_here" :password "db_user_password_here"}}
Run in dev mode:
lein run
Compile native binary by running:
lein native-image
run the app:
target/my-app
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK