An open API service indexing awesome lists of open source software.

https://github.com/jcf/minimal-clojure-example

Minimal example of a Clojure app using tools.deps
https://github.com/jcf/minimal-clojure-example

clojure dependencies example scripting

Last synced: 3 months ago
JSON representation

Minimal example of a Clojure app using tools.deps

Awesome Lists containing this project

README

          

* Minimal Clojure Example
With the release of [[https://https://clojure.org/guides/deps_and_cli][tools.deps]] we can now run Clojure code without the
additional complexity of tools like [[http://boot-clj.com/][Boot]] and/or [[https://leiningen.org/][Leiningen]].

This repo contains a single Clojure file that makes use of the excellent [[http://aleph.io/][Aleph]]
to send an HTTPS request to my favourite website.

* Let me try
#+begin_src shell
git clone https://github.com/jcf/minimal-clojure-example
cd minimal-clojure-example
clj -m hello
#+end_src

You should see a pretty-printed HTTP response something like this:

#+begin_src clojure
{:request-time 107,
:aleph/keep-alive? true,
:headers
{"x-cache" "Hit from cloudfront",
"server" "AmazonS3",
"age" "38",
"via"
"1.1 e20d69d2fa2e195b7488aaa53586c336.cloudfront.net (CloudFront)",
"content-type" "text/html",
"content-length" "1221",
"connection" "keep-alive",
"accept-ranges" "bytes",
"etag" "\"e8c68729f87c3e33f7e7231afcec349f\"",
"date" "Fri, 12 Jan 2018 14:33:59 GMT",
"last-modified" "Tue, 03 May 2016 21:49:35 GMT",
"x-amz-cf-id"
"7rKrGfMRsw-BrlOfj3p5F7JptwX14NcqPW4zT_tdHjoOnd8pMq6jeA=="},
:status 200,
:connection-time 224,
:body
"\njamesconroyfinn.com

About

My name is James Conroy-Finn, and I'm a person who can help plan, build, and deliver ideas.

I've worked for a variety of companies and have used a wide array of technologies, languages, and techniques to build products quickly, and collaboratively.

I write code when time permits, listen to music, and sometimes post pictures of what I'm up to.

I'm always interested in having a chat about ideas and opportunities so please send me an email if you think I might be able to help.

"}
#+end_src