Skip to content

refset/photon-xtdb-viewer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

photon-xtdb-starter

An example Photon app using XTDB. Adapted from xtdb-in-a-box

Setup

  • clone this repository
  • clone photon repository next to this one

Running

From command line

XTDB_ENABLE_BYTEUTILS_SHA1=true clj

Will:

From your editor (jack-in)

Make sure you set the XTDB_ENABLE_BYTEUTILS_SHA1 environnement variable to true before jacking-in.

Loading data

In ns app.core, evaluate these at the REPL:

(xt/submit-tx xtdb-node [[::xt/put {:xt/id "9" :user/name "alice"}]])
(xt/submit-tx xtdb-node [[::xt/put {:xt/id "10" :user/name "bob"}]])
(xt/submit-tx xtdb-node [[::xt/put {:xt/id "11" :user/name "charlie"}]])

About

An example Photon app using XTDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 86.8%
  • HTML 13.2%