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
- Host: GitHub
- URL: https://github.com/jcf/minimal-clojure-example
- Owner: jcf
- Created: 2018-01-12T14:54:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T14:55:21.000Z (almost 8 years ago)
- Last Synced: 2025-10-13T06:13:56.511Z (3 months ago)
- Topics: clojure, dependencies, example, scripting
- Language: Clojure
- Size: 1.95 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.org
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