

npm install -g harperdb
harperdbcurl http://localhost:9925/healthgit clone https://github.com/HarperDB/application-template my-app
cd my-app# @table defines a database table
# @primaryKey marks the id field
# @export makes this table a REST API at /Dog/
type Dog @table @export {
id: ID @primaryKey # unique record id
name: String # dog's name
breed: String # breed type
age: Int # dogβs age in years
tricks: [String] # list of tricks# ββ add a record βββββββββββββββββββββββββββββββ
curl -X POST http://localhost:9926/Dog/ \
-H "Content-Type: application/json" \
-d '{"name":"Harper","breed":"Labrador","age":3,"tricks":["sits"]}'
# ββ view that record βββββββββββββββββββββββββββ
curl http://localhost:9926/Dog/<id>git clone https://github.com/HarperDB/application-template my-app
cd my-appharperdb deploy_component \
project=<my-app-name> \
target=<your-cluster.your-org.harperfabric.com> \
username=<user> \
password=<pass> \
restart=true \
replicated=truecurl https://<your-cluster>.<your-org>.harperfabric.com/Dog/ \
-H "Authorization: Basic <base64(user:pass)>"