Mission control for Machinomy Hub
Copy example.env to .env and setup its parameters.
Ensure PostgreSQL' database (default - 'PaymentHub') and user (default user - 'paymenthub' with password '1') are exists in DBMS.
You can use only PostgreSQL as engine at the moment. Please, use only yarn, not npm.
Apply migrations (need only once per database)
yarn migrate
And do
1. yarn install
2. yarn build
3. yarn start
or
3. yarn inspect
for Node.js-debugging in Chrome.
URL guide:
/admin/login - Login
/admin/payments - Payments
/admin/channels - Channels
Default .env file:
WALLET_ADDRESS=0x363dfeAfB265A1e98403A7613A3325Ec00FaF222
ETH_RPC_URL=http://127.0.0.1:8545
PORT=5005
DATABASE_URL=postgresql://paymenthub:1@localhost/PaymentHub
REDIS_URL=redis://127.0.0.1:6379
WALLET_ADDRESS - 0x-prefixed admin Ethereum-address (for sign in via Vynos)
ETH_RPC_URL - URL of Ethereum RPC (you can use local Ganache, but ensure you correctly deployed machinomy-contracts, see instructions below)
PORT - listening port for dashboard's website and API
DATABASE_URL - connection URL for the main database. postgresql:// prefix is mandatory.
REDIS_URL - connection string for REDIS. redis:// prefix is mandatory.
- Clone Machinomy and Contracts to local filesystem
git clone [email protected]:machinomy/machinomy.git
git clone [email protected]:machinomy/contracts.git
- Change directory to machinomy-contracts and do yarn link, compile and deploy contracts.
yarn link
yarn truffle:compile
yarn truffle:migrate --reset
yarn prepublish
- Change directory to machinomy and do yarn link, yarn link @machinomy/contracts
yarn link
yarn link @machinomy/contracts
yarn migrate
yarn prepublish
- Change directory to hub-dashboard and do yarn link machinomy
yarn link machinomy
- Rebuild hub-dashboard
yarn build
- Ensure that @machinomy/contracts are available - open this file
hub-dashboard/node_modules/machinomy/node_modules/@machinomy/contracts/dist/build/contracts/Unidirectional.json
Search for 'networks' (the only occur will be at very end of file) and check available network IDs. Network ID from Ganache must be in the list and value of its key 'address' must match address of Unidirectional contract ( address of Unidirectional appears in terminal when you deployed @machinomy/contracts via yarn truffle:migrate --reset)
Node.js 10
yarnpkg 1.6
PostgreSQL 10