This is the API component for 2-Way-Peg solution.
Include a .env file with the required environment variables listed in .env.test
file (you can copy that file).
npm install
To only install resolved dependencies in package-lock.json
:
npm ci
Move to the SessionDB
folder and run:
docker-compose up -d
Move to the rsk-database
folder, copy your .env
file in it and then run:
docker-compose up -d
For some reason passing --env-file
argument to docker-compose doesn't seem to be working fine. That's why we need to copy the .env
file here too.
If you want to start the API alongside the daemon run:
npm start
If you prefer to execute just the API run:
npm run start-api
Open http://127.0.0.1:3000 in your browser to discover the API capabilities
If you prefer to execute just the daemon run:
npm run start-daemon
npm run lint
To automatically fix such issues:
npm run lint:fix
In the root directory run:
docker-compose up
npm run openapi-spec
: Generate OpenAPI spec into a file
npm test
To report a vulnerability, please use the vulnerability reporting guideline for details on how to do it.