jo-tm / windranger-mass-delegation-api-server

The API server that manages the delegation of votes and querying of an address' voting power.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

windranger-mass-delegation-api-server

Managing the delegation of voting power between addresses and provides querying of an address' voting power.

Install, build and run

Start by cloning the git repo locally.

Install

To retrieve the project dependencies and before any further tasks will run correctly.

npm ci

PostgresQL

To run the tests locally, in addition to the checked out code you'll also need an install of Postgres.

MacOS can easily use Homebrew

brew install postgres

Role for tests

psql postgres

CREATE ROLE unit_test_user 
LOGIN
CREATEDB 
PASSWORD 'unit-test-p@ssw0rd';

Start the Postgres service

brew services start postgres

Stop the Postgres service

brew services stop postgres

Husky Git Commit Hooks

To enable Husky commit hooks to trigger the lint-staged behaviour of formatting and linting the staged files prior before committing, prepare your repo with prepare.

npm run prepare

Build and Test

npm run build
npm test

If you make changes that don't get picked up then add a clean into the process

npm run clean
npm run build
npm test

About

The API server that manages the delegation of votes and querying of an address' voting power.

License:Apache License 2.0


Languages

Language:TypeScript 100.0%