Skip to content

Commit

Permalink
[docs] #78 Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
takatoshiinaoka committed Nov 9, 2024
1 parent 4d86aa4 commit 4f9c835
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# osakana-nazono-katakana

[御魚 なぞの カタカナ](https://topaz.dev/projects/8a75f0f1a40778afe31a) [topa'z]

## Documents

- [API Enviroment](./api/README.md)
- [Fishes Data](https://github.com/takatoshiinaoka/osakana-nazono-katakana/wiki)
- [Deploy Steps](https://qiita.com/takatoshiinaoka/items/fd7c0a4a53b4badd7c4f)

## Installation

1. run make init
Expand All @@ -9,22 +17,20 @@

番外:make が使えない場合も書かれています。

## 0. CosmosDB との接続情報を配置する。
### 0. CosmosDB との接続情報を配置する。

`api/local.settings.json`を作成してください。内容は @yukinissie に聞いてください。

## 1. run make init
### 1. run make init

git clone したらプロジェクトのルートで以下のコマンドを打ちます。
ルートと api ディレクトリにある package.json に従って yarn install されます。
package.json が更新されるたびに実行するといいでしょう。

```sh
make init
```

ルートと api ディレクトリにある package.json に従って yarn install されます。
package.json が更新されるたびに実行するといいでしょう。

## 2. run make watch_api
### 2. run make watch_api

次に以下のコマンドを実行します。

Expand All @@ -34,30 +40,29 @@ make watch_api

コードの変更があるたびにリビルドしてくれます。ビルド後の成果物は 3.のエミュレーターや本番上で使われます。以下のログが出力されれば成功しています。(開発を終えるまでは止めないでください)

```
```sh
Found 0 errors. Watching for file changes.
```

## 3. run make run_app_with_api
### 3. run make run_app_with_api

2.とは別のターミナル(端末)を開きます。そして以下のコマンドを実行します。

```sh
make run_app_with_api
```

## 4. yarn dev
### 4. yarn dev

yarn dev で開発サーバーを起動します。

```
```sh
yarn dev
```

React: http://localhost:5173
API: http://localhost:7071
React: [http://localhost:5173](http://localhost:5173), API: [http://localhost:7071](http://localhost:7071)

## 番外 make が使えない場合
### 番外 make が使えない場合

プロジェクトのルートで以下を実行します。

Expand All @@ -75,9 +80,8 @@ chmod +x ./cmd/*

yarn dev で開発サーバーを起動します。

```
```sh
yarn dev
```

React: http://localhost:5173
API: http://localhost:7071
React: [http://localhost:5173](http://localhost:5173), API: [http://localhost:7071](http://localhost:7071)
10 changes: 9 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

Static Web Apps の API です。

## プロジェクトのセットアップ

設定ファイルをコピーしてデータベースの接続情報を設定します。

```sh
cp local.settings.json.example local.settings.json
```

## api のホットリロード

オプション -w
監視モードでコンパイラを実行します。 入力(input)ファイルを監視し、変更時に再コンパイルをトリガします。

```
```sh
"watch": "tsc -w"
```

0 comments on commit 4f9c835

Please sign in to comment.