Skip to content

Clojure Microservice, used: datomic, docker, pedestal, component, schema, hexagonal architecture

Notifications You must be signed in to change notification settings

thiagozg/GitHubJobs-Clojure-Service

Repository files navigation

GitHub Jobs an Clojure Microservice

This Service was created with the objective of exploring how to code a CRUD application from zero using Clojure language and other tools, like:

How to run

  1. First of all, you'll need lein configured
  2. Create a datomic account if you still don't have one
  3. Log into your datomic account and go to the Licenses Page
  4. Click on the Send License Key button. This will send you and email with a license key. We will also use the Download Key you can find on this page.
  5. Substitute ${hue} for your credentials and execute:
make infra-credentials DATOMIC_LOGIN=${hue} \
DATOMIC_PASSWORD=${hue} \
DATOMIC_LICENSE_KEY=${hue} \
DATOMIC_VERSION=${hue} \
STORAGE_ADMIN_PASSWORD=${hue} \
STORAGE_DATOMIC_PASSWORD=${hue}
  • DATOMIC_LOGIN is the email you have used to create your datomic account on step 2
  • DATOMIC_PASSWORD is the Download Key you can find on step 3.
  • DATOMIC_LICENSE_KEY is what was sent to you on step 4 without the license_key key and with no line breaks.
  • DATOMIC_VERSION should be the same you use on project.clj
  • STORAGE_ADMIN_PASSWORD and STORAGE_DATOMIC_PASSWORD can be anything you want.

Example:

make infra-credentials [email protected] \
DATOMIC_PASSWORD=aed2a94a-60e2-11eb-ae93-0242ac130002 \
DATOMIC_LICENSE_KEY=32hdd9qhd38h33....h3297hd2o23d \
DATOMIC_VERSION=0.9.6045 \
STORAGE_ADMIN_PASSWORD=bla \
STORAGE_DATOMIC_PASSWORD=ble
  1. Make sure you have maven installed on your machine. If you don't have it, you can install it via brew install maven or your preferred method.
  2. Go to datomic download page and download datomic-pro-0.9.6045.zip
  3. Unzip the file you have just downloaded, open a terminal window inside the folder you have just unziped and run:
mvn install
./bin/maven-install
  1. Execute make infra-run
  2. Execute make deps
  3. Execute make run

How to play

You can import Postman Collection to your postman app and make HTTP requests.