amarts / cord-agent-app-v1

Agent (REST API endpoint) for cord.js sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CORD APIs

This project provides REST APIs to cord.js SDK. We can call it an agent as this can be hosted on one of the local network machine, and can work on once's behalf while interacting with the chain.

Development

Start with below steps:

$ docker build -t dhiway/agent:latest .
$ docker compose up

This will start a DB service, and also the dhiway/agent application, with required flags.

If you want to run without docker, then the ENV variables needs to be passed properly, or update in src/dbconfig.ts. Run 'yarn && yarn build && yarn start'

NOTE: If you can't use docker-compose, you can still run the project individually. Make sure to set the ENV variables present in .env file.

One may need wsl (Windows Subsystem for linux) installed on Windows.

Docs

Check API documentation by checking http://localhost:5001/docs while project is running.

Or if you want a local html page then run npx open-swagger-ui ./apis.json --open from console.

About

Agent (REST API endpoint) for cord.js sdk

License:Apache License 2.0


Languages

Language:TypeScript 63.6%Language:JavaScript 15.1%Language:Python 14.8%Language:Shell 6.1%Language:Dockerfile 0.4%