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

Enhance astraiso.io documentations #139

Merged
merged 1 commit into from
Aug 14, 2024
Merged
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
14 changes: 0 additions & 14 deletions docs/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 4
title: Configuration
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

The configurations in this page can be set from several sources in the following order:

1. the [operating system's environment variables]; for instance, an environment variable can be set with
Expand Down
14 changes: 0 additions & 14 deletions docs/docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 3
title: Development
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

Running Tests
-------

Expand Down
Binary file added docs/docs/img/graphiql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 40 additions & 14 deletions docs/docs/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 1
title: Getting Started
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand Down Expand Up @@ -62,6 +48,8 @@ mvn clean package --settings settings.xml.example
MODEL_PACKAGE_NAME=com.paiondata.astraios.data.models docker compose up --build --force-recreate
```

Note that the `settings.xml` is the [Maven config file for loading the data model](#loading-data-models)

:::info

- `com.paiondata.astraios.data.models` is the name of the model in the aforementioned
Expand All @@ -71,9 +59,47 @@ MODEL_PACKAGE_NAME=com.paiondata.astraios.data.models docker compose up --build

:::

If everything runs successfully, we should be able to see the following output at end of the command line output:

```console
web-1 | 25-06-2024 04:41:53.654 [main] [Elide, ] INFO o.a.coyote.http11.Http11NioProtocol.log - Starting ProtocolHandler ["http-nio-8080"]
web-1 | 25-06-2024 04:41:53.676 [main] [Elide, ] INFO o.s.b.w.e.tomcat.TomcatWebServer.start - Tomcat started on port(s): 8080 (http) with context path ''
web-1 | 25-06-2024 04:41:53.709 [main] [Elide, ] INFO com.paiondata.astraios.App.logStarted - Started App in 14.755 seconds (process running for 16.004)
```

A MySQL database container has also started alongside and is accessible via

```console
mysql -h localhost -D elide -P 3306 --protocol=tcp -u root -proot
```

All data is persisted in a database called __elide__

Writing Data
------------

:::tip[Installing GraphiQL]

GraphiQL offers a user-friendly UI for issuing GraphQL queries and displaying query responses. We can use it for the
API call below.

- __Mac__ uses [Homebrew](https://formulae.brew.sh/cask/graphiql)

```console
brew install --cask graphiql
```

- __Windows__ binary can be downloaded from the [release page](https://github.com/skevy/graphiql-app/releases).
Then install the downloaded `.exe` file
- __Linux__ users can follow the
[official documentation](https://github.com/skevy/graphiql-app?tab=readme-ov-file#linux-installation)

When installed, the GraphiQL user interface looks like the following:

![Error loading graphiql.png](./img/graphiql.png)

:::

### Inserting Data

We have defined our views on the database and exposed those views over HTTP. Next let's use cURL to put data in the
Expand Down
14 changes: 0 additions & 14 deletions docs/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 2
title: Setup
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

This section discusses the one-time setup in order to develop [Astraios].

Prepare for Local Development
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 4
title: 配置
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

此页面中的配置可以按照以下顺序从以下几个来源进行设置,:

1. [操作系统的环境变量];例如,可以通过 `export DB_URL="jdbc:mysql://db/elide?serverTimezone=UTC"` 设置环境变量
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 3
title: 开发
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

运行测试
-------

Expand Down
14 changes: 0 additions & 14 deletions docs/i18n/zh-cn/docusaurus-plugin-content-docs/current/intro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 1
title: 快速入门
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Expand Down
14 changes: 0 additions & 14 deletions docs/i18n/zh-cn/docusaurus-plugin-content-docs/current/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ sidebar_position: 2
title: 设置
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 (the "License");)
[//]: # (you may not use this file except in compliance with the License.)
[//]: # (You may obtain a copy of the License at)

[//]: # ( http://www.apache.org/licenses/LICENSE-2.0)

[//]: # (Unless required by applicable law or agreed to in writing, software)
[//]: # (distributed under the License is distributed on an "AS IS" BASIS,)
[//]: # (WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
[//]: # (See the License for the specific language governing permissions and)
[//]: # (limitations under the License.)

本节讨论开发 [Astraios] 的一次性设置。

为本地开发做好准备
Expand Down
Loading