chore: add --mockScoring flag

chore: add link to the lamassu-machine repository

chore: use proper heading levels

chore: add subsequent runs section
This commit is contained in:
Nikola Ubavic 2021-11-18 15:45:35 +01:00
parent aff8fe373b
commit faa075c976
3 changed files with 82 additions and 35 deletions

View file

@ -1,8 +1,10 @@
# Preliminaries for using nix
# 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
### Set up PostgreSQL
```
sudo -u postgres createdb lamassu
@ -16,13 +18,13 @@ In ``psql``, run the following and set password to ``postgres123``:
ctrl-d
```
## Starting up environment
### 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
## Installation
## Install node modules
### Install node modules
Make sure you're running NodeJS 8.3 or higher. Ignore any warnings.
@ -30,7 +32,7 @@ Make sure you're running NodeJS 8.3 or higher. Ignore any warnings.
npm install
```
## Generate certificates
### Generate certificates
```
bash tools/cert-gen.sh
@ -39,7 +41,7 @@ bash tools/cert-gen.sh
Notes:
- This will create a ``.lamassu`` directory in your home directory.
## Set up database
### Set up database
Important: lamassu-migrate currently gripes about a QueryResultError. Ignore this, it works anyway.
@ -47,7 +49,7 @@ Important: lamassu-migrate currently gripes about a QueryResultError. Ignore thi
node bin/lamassu-migrate
```
## Run new-lamassu-admin
### Run new-lamassu-admin
```
cd new-lamassu-admin/
@ -55,7 +57,7 @@ npm install
npm run start
```
## Run lamassu-admin-server
### Run lamassu-admin-server
In a second terminal window:
@ -63,7 +65,7 @@ In a second terminal window:
node bin/lamassu-admin-server --dev
```
## Register admin user
### Register admin user
In a third terminal window:
@ -73,7 +75,7 @@ node bin/lamassu-register admin@example.com superuser
You'll use this generated URL in the brower in a moment.
## Complete configuration
### Complete configuration
Paste the URL from lamassu-register exactly as output, into a browser (chrome or firefox).
@ -81,14 +83,35 @@ Paste the URL from lamassu-register exactly as output, into a browser (chrome or
Go to all the required, unconfigured red fields and choose some values. Choose mock services whenever available.
## Run lamassu-server
### Run lamassu-server
```
node bin/lamassu-server --mockSms
node bin/lamassu-server --mockSms --mockScoring
```
## Add a lamassu-machine
### 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.
Now continue with lamassu-machine instructions from the ``INSTALL.md`` file in [lamassu-machine repository](https://github.com/lamassu/lamassu-machine).
## Subsequent runs
To start the Lamassu server run:
```
node bin/lamassu-server --mockSms --mockScoring
```
To start the Lamassu Admin run:
```
node bin/lamassu-admin-server --dev
```
and
```
cd new-lamassu-admin/
npm run start
```