* dev: (85 commits) chore: console.log debug leftovers fix: third level navigation links fix: show subheader on refresh fix: machines/:id routing fix: customer route chore: update wallet nodes feat: shorten long addresses in funding page feat: shorten long addresses refactor: support copied text different from presented text chore: udpate react, downshift and routing refactor: use Wizard component on first route fix: autocomplete component rendering feat: skip2fa option on .env fix: drop contraint before dropping index chore: stop using alias imports fix: re-instate urlResolver chore: server code formatting chore: reformat code chore: adding eslint and prettier config chore: typo ...
2.5 KiB
Install - nix
Preliminaries for using nix
For a dev environment with nix package manager a postgres install on the base system is required, this guide does not cover a postgresql server running with nix-shell.
Set up PostgreSQL
sudo -u postgres createdb lamassu
sudo -u postgres psql postgres
In psql, run the following and set password to postgres123:
\password postgres
ctrl-d
Starting up environment
shell.nix script provided, all you need to do to setup the environment is to run nix-shell on the folder.
Installation
Install node modules
npm install
Generate certificates
bash packages/server/tools/cert-gen.sh
Notes:
- This will create a
.lamassudirectory in your home directory.
Set up database
Important: lamassu-migrate currently gripes about a QueryResultError. Ignore this, it works anyway.
node packages/server/bin/lamassu-migrate
Run new-lamassu-admin
cd packages/admin-ui/
npm run start
Run lamassu-admin-server
In a second terminal window:
node packages/server/bin/lamassu-admin-server --dev
Register admin user
In a third terminal window:
node packages/server/bin/lamassu-register admin@example.com superuser
You'll use this generated URL in the brower in a moment.
Complete configuration
Paste the URL from lamassu-register exactly as output, into a browser (chrome or firefox).
Important: the host must be localhost. Tell your browser to trust the certificate even though it's not signed by a recognized CA. If you get an "expired" error, try opening https://localhost:8070/graphql in another tab and trust the certificate.
Go to all the required, unconfigured red fields and choose some values. Choose mock services whenever available.
Run lamassu-server
node packages/server/bin/lamassu-server --mockScoring
Add a lamassu-machine
Click on + Add Machine in the sidebar. Type in a name for your machine and click Pair. Open up development tools to show the JavaScript console and copy the totem. You will use this to run lamassu-machine. This pairing totem expires after an hour.
Now continue with lamassu-machine instructions from the INSTALL.md file in lamassu-machine repository.
Subsequent runs
To start the Lamassu server run:
node packages/server/bin/lamassu-server --mockScoring
To start the Lamassu Admin run:
node packages/server/bin/lamassu-admin-server --dev
and
cd packages/admin-ui/
npm run start