Skip to content

Commit

Permalink
readme for the impl
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed Oct 23, 2023
1 parent 1a821a7 commit 5050727
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions impl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Server Implementation

- Heavily a work-in-progress
- Designed to be run as a single instance

## Config

# TOML Config File

Config is managed using a [TOML](https://toml.io/en/) [file](../../config/dev.toml). There are sets of configuration values for the server
(e.g. which port to listen on), the services (e.g. which database to use), and each service.

Each service may define specific configuration, such as which DID methods are enabled for the DID service.

A full config example is [provided here](../../config/kitchensink.toml).

## Usage

How it works:

1. On startup the service loads default values into the `ServiceConfig`
2. Checks for a TOML config file:
- If exists, load toml file
- If does not exist, it uses a default config defined in the code inline
3. Loads the `config/.env` file and adds the env variables defined in this file to the final `ServiceConfig`

## Build & Run

Run:

```
docker build . -t did-dht -f build/Dockerfile
```

and then

```
docker run -p8305:8305 did-dht
```


0 comments on commit 5050727

Please sign in to comment.