Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe committed Apr 3, 2024
1 parent b3e1773 commit 3f6057c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 99 deletions.
96 changes: 9 additions & 87 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ This guide is for you.

## Development Prerequisites

___***UPDATE TABLE OF PROJECT DEPS AND INSTALLATION NOTES***___

| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|------------------------------------------------------|
| Go | 1.17.6 |[go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.12.1 |[magefile.org](https://magefile.org/) |
| Java | 17.0.2 | Below, recommended via [SDKMan](https://sdkman.io) |
| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|-------------------------------------------------------|
| Go | 1.22.1 | [go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.15.0-5 | [magefile.org](https://magefile.org/) |

### Go

Expand All @@ -29,7 +27,7 @@ You may verify your `go` installation via the terminal:

```
$> go version
go version go1.17.6 darwin/amd64
go version go1.22.1 darwin/amd64
```

If you do not have go, we recommend installing it by:
Expand All @@ -53,10 +51,10 @@ You may verify your `mage` installation via the terminal:

```
$> mage --version
Mage Build Tool 1.12.1
Build Date: 2021-12-15T21:00:02Z
Commit: 2f1ec40
built with: go1.17.6
Mage Build Tool v1.15.0-5-g2385abb
Build Date: 2024-03-21T12:20:13-07:00
Commit: 2385abb
built with: go1.22.1
```

#### MacOS
Expand All @@ -70,47 +68,6 @@ $> brew install mage
#### Linux

Installation instructions are on the [Magefile home page](https://magefile.org/).

### Java

This project is written in Java, a typesafe, compiled programming language.

You may verify your `java` installation via the terminal by running `java -version`.

If you do not have Java, we recommend installing it
via [SDKMan](https://sdkman.io/install). This is a project which will allow you
to easily install the Java Development Kit (JDK), runtime (JRE), and related frameworks,
build tools, and runtimes.

After you've installed SDKMan, you may install Java:

#### SDKMan (cross-platform instructions)

```shell
$> sdk install java
...
Do you want java 17.0.2-open to be set as default? (Y/n): Y
Setting java 17.0.2-open as default.
```

You may test your installation:

```shell
$> java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
```

---
**NOTE**

You may additionally look for other Java versions to install by running `sdk list java`:

...or other installation candidates like Apache Ant, Apache Maven, etc, by running `sdk list`.

Consult the SDKMan documentation for more info.

---

## Build (Mage)
Expand All @@ -119,47 +76,12 @@ Consult the SDKMan documentation for more info.
$> mage build
```

## Build (Java / Gradle)

### macOS / Linux
```shell
$> ./gradlew build
```

### Windows
```shell
$> gradlew.bat build
```

## Test (Mage)

```
$> mage test
```

## Test (Java / Gradle)

### macOS / Linux
```shell
$> ./gradlew test
```

### Windows
```shell
$> gradlew.bat test
```

---
**NOTE**

You may also combine Gradle build targets in one call, like:

```shell
$> ./gradlew clean build test
```

---

## Communications

### Issues
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ docker run \
| Typescript | Yes | No | [web5-js](https://github.com/TBD54566975/web5-js/blob/main/packages/dids/src/methods/did-dht.ts) |
| Kotlin | Yes | No | [web5-kt](https://github.com/TBD54566975/web5-kt/tree/main/dids/src/main/kotlin/web5/sdk/dids/methods/dht) |
| Swift | Yes | No | [web5-swift](https://github.com/TBD54566975/web5-swift/blob/main/Sources/Web5/Dids/Methods/DIDDHT.swift) |
| Dart | Yes | No | [web5-dart](https://github.com/TBD54566975/web5-dart/tree/main/packages/web5/lib/src/dids/did_dht) |
| Rust | Yes | No | Coming soon! |

## Project Resources
Expand Down
20 changes: 8 additions & 12 deletions impl/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# 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).
Config is managed using a [TOML](https://toml.io/en/) [file](../../config/dev.toml). There are sets of configuration value
s for the server (e.g. which port to listen on) and each sub-component (e.g. which database to use).

## Usage

Expand Down Expand Up @@ -60,10 +53,13 @@ docker build \
and then

```sh
docker run --publish 8305:8305 did-dht
docker run \
--publish 8305:8305 \
--publish 6881:6881/udp \
did-dht
```

### Postgres

To use a postgres database as the storage backend, set configuration option `storage_uri` to a `postgres://` URI with the database
connection string. The schema will be created or updated as needed while the program starts.
To use a postgres database as the storage backend, set configuration option `storage_uri` to a `postgres://` URI with
the database connection string. The schema will be created or updated as needed while the program starts.

0 comments on commit 3f6057c

Please sign in to comment.