Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Jan 12, 2024
1 parent 5b15901 commit 756d768
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# for Admins

- [Install with Docker](./admins/install-with-docker.md)
- [Create Account](./admins/create-account.md)

# for Developers

Expand Down
27 changes: 27 additions & 0 deletions docs/src/admins/create-account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Create Account

Ensure you set `HATSU_ACCESS_TOKEN` correctly in the [previous section](./install-with-docker.md) first, otherwise you will not be able to use the Hatsu Admin API.

## just

The easiest way to create an account is the [`just`](https://github.com/casey/just) command line tool:

```bash
just account create example.com
```

If you are using docker, you need to exec to the container first.

```bash
docker exec -it hatsu /bin/bash
```

## curl

You can also access the API via curl, as `Justfile` does.

```bash
curl -X POST "http://localhost:$(echo $HATSU_LISTEN_PORT)/api/v0/admin/create-account?token=$(echo $HATSU_ACCESS_TOKEN)" \
-H "Content-Type: application/json" \
-d "{\"name\": \"example.com\"}"
```

0 comments on commit 756d768

Please sign in to comment.