Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tendant/demo-xtdb-server
https://github.com/tendant/demo-xtdb-server
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tendant/demo-xtdb-server
- Owner: tendant
- Created: 2022-03-24T00:46:24.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-31T04:03:01.000Z (over 2 years ago)
- Last Synced: 2024-10-12T13:31:21.932Z (2 months ago)
- Language: Clojure
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
DON'T use namespace xtdb.node. Conflict on namespace will introduce strange bug/issue
## Start local podman instance
podman run --name pgsql -p 15432:5432 -e POSTGRES_PASSWORD=pwd -d docker.io/postgres:14-alpine## Connect to local database
psql -U postgres -p 15432 -h localhost## Create test database
CREATE USER xtdb WITH PASSWORD 'pwd';
CREATE DATABASE xtdb_db ENCODING 'UTF8' OWNER xtdb;
GRANT ALL PRIVILEGES ON DATABASE xtdb_db TO xtdb;## Testing commands
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"tx-ops": [
["put", {
"xt/id": "demo-id",
"name": "Joe",
"last-name": "Unknown"
}]
]}' \
http://localhost:3000/_xtdb/submit-tx
curl -X GET \
-H "Accept: application/json" \
http://localhost:3000/_xtdb/entity\?eid\=demo-id