diff --git a/README.md b/README.md index b559b8a..bc22e5d 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,54 @@ Add an email address for use in your [IRMA app](https://github.com/privacybydesign/irma_mobile). - ## Setting up the server -1. Generate JWT keys for the issuer +### Prerequisite + +Go, Gradle v4, JDK, Yarn, and an installation of IRMA server: + +```bash +go install github.com/privacybydesign/irmago@latest +``` + +### Install + +1. Clone repository +```bash +git clone git@github.com:privacybydesign/irma_email_issuer.git +cd irma_email_issuer/ +``` +2. Generate JWT keys for the issuer ```bash ./utils/keygen.sh ./src/main/resources/sk ./src/main/resources/pk ``` -2. Copy the file `src/main/resources/config.sample.json` to - `build/resources/main/config.json` and modify it. -3. Run `gradle appRun` in the root directory of this project. -4. Navigate to `http://localhost:8080/irma_email_issuer/api/hello` +3. Build the project +```bash +gradle build +``` +4. Copy `src/main/resources/config.sample.json` to `build/resources/main/config.json` and modify it +```bash +cp src/main/resources/config.sample.json build/resources/main/config.json +sed -i 's/"secret_key": "",/"secret_key": "thisisjustavalueandnotarealsecretsomemorecharactersuntilwehave64",/' ./build/resources/main/config.json +``` +5. Create front end +```bash +( cd webapp/ +yarn install +./build.sh nl +cp config.example.js build/assets/config.js ) +``` +6. Configure mail delivery in `build/resources/main/config.json` + +### Run + +1. Start IRMA server (in the root directory of this project) +```bash +~/go/bin/irma server --static-path ./webapp/build +``` +2. Run the application +```bash +gradle appRun +``` +3. Navigate to `http://localhost:8088/` with CORS disabled +(for example: `chromium --disable-web-security --user-data-dir=/tmp/chromium-disable-web-security`) diff --git a/webapp/config.example.js b/webapp/config.example.js index 75e32f6..9d181cd 100644 --- a/webapp/config.example.js +++ b/webapp/config.example.js @@ -1,4 +1,4 @@ var config = { - IRMASERVER: '', - EMAILSERVER: '', + IRMASERVER: 'http://localhost:8088', + EMAILSERVER: 'http://localhost:8080/irma_email_issuer', };