CNTRPRTY / xcpdev-genesis

Open Counterparty Bitcoin Data Explorer - DIY Node
https://xcp.dev
The Unlicense
4 stars 4 forks source link

API Refactor #6

Closed JavierCervilla closed 8 months ago

JavierCervilla commented 8 months ago

Refactor of Routes: [+] Added scripts to package.json start and dev. (with watch mode in dev) [+] Added Import syntax instead of require syntax. [+] Added config.js file to export all the config vars. [+] Added a db.js file to export db connection. [+] Added a v1.router.js file where are all the current routes used by xcp.dev without any changes. under the route( '/' ) [+] Added a v2.router.js file where will be all the replacements for xchain apis. under the route( '/api' )

JavierCervilla commented 8 months ago

Would be interesting refactor queries file also as is a 1000 lines file and would be better for readibility and maintaining, open discussion for that

jotapea commented 8 months ago

Excellent work @JavierCervilla , great re-starting point ;)