Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/update documentation #23

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 46 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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
```
sanderhollaar marked this conversation as resolved.
Show resolved Hide resolved
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
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go install should add the binary to your PATH too, at least that's the case with me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to document that step or can we expect either the package manager or the reader to take care of that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you installed Go in a way that the ~/go/bin was not added to your PATH automatically, then it's probably better to either mention this or keep it the way you did it now.

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`)
4 changes: 2 additions & 2 deletions webapp/config.example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var config = {
IRMASERVER: '',
EMAILSERVER: '',
IRMASERVER: 'http://localhost:8088',
EMAILSERVER: 'http://localhost:8080/irma_email_issuer',
};