Sign inSign up

juxt/crux-in-memory

By juxt

•Updated about 5 years ago

A batteries included docker image for a 'batteries included' Crux node

Image
0

4.9K

juxt/crux-in-memory repository overview

A 'batteries included' docker image for an in memory Crux node⁠, containing:

Getting Started:

Use the following command to start the node:

docker run -d -p 3000:3000 -p 1501:1501 juxt/crux-in-memory:<version>

You can submit a set of transactions⁠ to the standalone node:

curl -X POST \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{"tx-ops": [["put", {"crux.db/id": "ivan", "name": "Ivan", "last-name": "Petrov"}]]}' \
     localhost:3000/_crux/submit-tx

This transaction will put ivan into the database, and returns a document containing information about the submitted transaction (where txId is a monotonically increasing transaction ID, and txTime is the transaction time⁠).

{"txId":1,"txTime":"2021-01-22T10:31:42Z"}

You can then get the entity, ivan, from the _crux/entity endpoint:

curl -X GET \
     -H "Accept: application/json" \
     localhost:3000/_crux/entity?eid=ivan

Returning the originally submitted document:

{"crux.db/id": "ivan", "name": "Ivan", "last-name": "Petrov"}

Further reading:

For a set of Crux usage tutorials, see here⁠.

For a full set of REST commands for the node, see here⁠.

For interfacing with the node using SQL, see here⁠.

Tag summary

Content type

Image

Digest

Size

368.1 MB

Last updated

about 5 years ago

docker pull juxt/crux-in-memory:1.18.1