≡ Menu

Up and Running Datomic Starter

The recipe:
1. datomic-pro. Download lewat

https://my.datomic.com/downloads/pro

2. datomic console. Download at

https://my.datomic.com/downloads/console

3. MusicBrainz sample database. Download at

http://s3.amazonaws.com/mbrainz/datomic-mbrainz-backup-20130611.tar

After finish-up registration, the license key goes to your email. First, extract the datomic itself, then config the dev-transactor-template.properties transactor in ./config/samples/ with your license.

To pull datomic to your Clojure project, make sure you go to https://my.datomic.com/account. After that copy the line:

{#"my\.datomic\.com" {:username "youremail@company.com"
                      :password "xxxxxxx-yyyyyy-xxxx-zzzzz-xxxxxxxxtttt"}}

to ~/.lein/credentials.clj, then encrypt it using gpg, make sure not using passphrase. To encrypt it, run

gpg --default-recipient-self -e ~/.lein/credentials.clj > ~/.lein/credentials.clj.gpg

Now, in your Clojure project project.clj add:

:repositories {"my.datomic.com" {:url "https://my.datomic.com/repo"
                                 :creds :gpg}}
:dependencies [[com.datomic/datomic-pro $VERSION]]

To run datomic, steps:

1. Go to datomic extracted directory
2. fire up the datomic:

bin/transactor config/samples/dev-transactor-template.properties

3. To restore MusicBrainz database: extract it then, run. Wait it till restoring done.

bin/datomic restore-db file:datomic-mbrainz-backup-20130611 datomic:dev://localhost:4334/mbrainz

4. Run the datomic console:

bin/console -p 8080 dev datomic:dev://localhost:4334/

5. Open the browser:

http://localhost:8080/browse
{ 2 comments… add one }
  • Eurus August 30, 2017, 12:34 pm

    bang, buat tutorial clojure(script) dari awal dong? :D, yang dari luar terlalu advance buat saya hahahah

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.