Page MenuHomePhabricator

[token-server] Add database and initialize blacklist endpoints
ClosedPublic

Authored by bytesofman on Sun, Oct 27, 23:35.

Details

Summary

Add a database and initialize blacklist with usable API endpoints.

Going forward, will add a way to update the blacklist without updating the repo.

Test Plan

npm test

ts-node index.ts and db is created and populated with blacklist
ctrl+c and shuts down gracefully
ts-node index.ts and db is connected, blacklist collection is not overwritten, we see console.log that it has 12 elements

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Update tests, remove unused logic, isValidTokenId function and tests

update connection to support env var for dockerized docker connection

keep db port in secrets file

This revision is now accepted and ready to land.Tue, Oct 29, 13:16