Skip to content

Commit

Permalink
Merge pull request #3 from BlowaterNostr/doc
Browse files Browse the repository at this point in the history
Update Doc
  • Loading branch information
CreatCodeBuild authored Mar 31, 2024
2 parents 36c19e4 + 8c7838b commit 1c617c3
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# Relayed
[![deno module](https://shield.deno.dev/x/relayed)](https://deno.land/x/relayed)

> [!IMPORTANT]
> Make Small Relay Great for the first time!
Relayed is lightweight relay written in Deno.

- built-in database
- GraphQL API for relay management

## Quick Start

1. Install Deno at https://deno.land/manual/getting_started/installation.

2. Run following command in your CLI:
```bash
# relayed_pw is the password for the relayed admin
relayed_pw=123whatever deno run -r --allow-net --allow-env --unstable https://deno.land/x/relayed/deploy/example.ts
```

3. You have a relay!

## Local Development

Expand All @@ -7,22 +28,22 @@ To begin, install Deno by following the instructions at https://deno.land/manual
Next, create a file named `deploy/default.ts`:

```bash
cp deploy/default.example.ts deploy/defalut.ts
cp deploy/example.ts deploy/defalut.ts
```

After that, launch the project with the command:

```bash
deno task start
relayed_pw=123whatever deno task start
```

Finally, open your browser and go to `http://localhost:8000/api` to access the GraphQL playground.
Finally, open your browser and go to http://localhost:8080/api to access the GraphQL playground.

### Use GraphQL Playground

To begin, click the `Re-fetch GraphQL schema` button to retrieve the schema.
In the Headers section, include `{"password":"123whatever"}` for identity verification.

In the Headers section, include `{"password":"123456"}` for identity verification.
Click the `Re-fetch GraphQL schema` button to retrieve the schema.

You can now utilize the GraphQL Playground to communicate with the server.

Expand Down

0 comments on commit 1c617c3

Please sign in to comment.