Skip to content

Commit 6a2d2c6

Browse files
authored
Docs: Update README.md (#151)
1 parent d075a66 commit 6a2d2c6

File tree

2 files changed

+129
-34
lines changed

2 files changed

+129
-34
lines changed

README.md

+63-16
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,86 @@ Develop documentation: [Wiki](https://github.com/utaipei-sa/reserve.utsa/wiki)
1212
- Swagger UI: http://localhost:3000/docs
1313
- Redoc: http://localhost:3000/redoc
1414

15-
## How to run
16-
17-
### Local
18-
19-
1. `cd backend`
20-
2. `npm install`
21-
3. `cp .env.template .env`
22-
4. Fill environment variables in `.env` according to the document
23-
5. `nodemon` (if you don't need auto reload, you can use `npm start`)
15+
## Environment setup
2416

25-
### Docker
26-
27-
1. `docker-compose up -d --build`
28-
29-
### Dev container
17+
### Dev container (recommended)
3018

3119
#### Visual Studio Code
3220

3321
1. If you're using Windows OS, connect to WSL first.
3422
2. Open project directory.
3523
3. Select "Reopen in Container"
36-
4. Start your development journey!
3724

3825
#### JetBrains IDEs
3926

4027
1. Open your project in one of JetBrains IDEs (**WebStorm** is recommended).
4128
2. Open .devcontainer/devcontainer.json.
4229
3. Click the icon near the `{` in the editor, then select "Create Dev Container and Mount Sources...".
43-
4. Follow the instruction, and enjoy your development journey!
30+
4. Follow the instruction.
31+
32+
### Local/Docker
33+
34+
1. Install [Node.js](https://nodejs.org).
35+
2. Install [MongoDB](https://www.mongodb.com/try/download/community).
36+
37+
## How to run
38+
39+
### Local
40+
41+
1. Install dependencies.
42+
43+
```sh
44+
npm install
45+
```
46+
47+
2. Copy .env file.
48+
49+
```sh
50+
cp .env.template .env
51+
```
52+
53+
3. Fill environment variables in `.env` according to the document.
54+
55+
4. Start the dev server.
56+
```sh
57+
nodemon
58+
```
59+
60+
If you don't need auto reload, you can use the following command instead:
61+
62+
```sh
63+
npm start
64+
```
65+
66+
### Docker
67+
68+
Start Docker Compose containers.
69+
70+
```sh
71+
docker compose up -d --build
72+
```
4473
4574
## Environment variables
4675
4776
- `FRONTEND_BASE_URL` Base URL of website, is used to create verification link
4877
- `RESERVE_MONGODB_URI` This URI is used when connecting to MongoDB.
4978
- `EMAIL` Email address for sending email
5079
- `EMAIL_PASSWORD` Password for login to Email address in `EMAIL`
80+
81+
## Contribution
82+
83+
Welcome!
84+
85+
Don't forget to update the docs after you update some code. (Especially the JSDoc comments of the APIs.)
86+
87+
## FQA
88+
89+
<details>
90+
91+
<summary>Why choose JavaScript?</summary>
92+
93+
Because it's simple. The CS department of our school has JavaScript-related courses, so there are more students who have JavaScript skills than TypeScript.
94+
95+
That's also the reason why we choose npm.
96+
97+
</details>

README.zh-tw.md

+66-18
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,87 @@ UTSA 管理的空間及物品預約平台。
1212
- Swagger UI: http://localhost:3000/docs
1313
- Redoc: http://localhost:3000/redoc
1414

15-
## 如何運行
16-
17-
### 本地
15+
## 環境設置
1816

19-
1. `cd backend`
20-
2. `npm install`
21-
3. `cp .env.template .env`
22-
4. 根據文件描述填寫 `.env` 內的環境變數
23-
5. `nodemon`(如果你不需要自動重新載入,可以使用 `npm start`
24-
25-
### Docker
26-
27-
1. `docker-compose up -d --build`
28-
29-
### 開發容器
17+
### 開發容器(推薦)
3018

3119
#### Visual Studio Code
3220

3321
1. 如果你使用的是 Windows 作業系統,請先連線至 WSL(Windows 的 Linux 子系統)
3422
2. 打開專案目錄
3523
3. 選擇「在容器中重新開啟」
36-
4. 開始你的開發之旅!
3724

3825
#### JetBrains 整合式開發環境
3926

40-
1. 在其中一個 JetBrains IDE(建議使用 **WebStorm**中開啟你的專案
27+
1. 在其中一個 JetBrains IDE(建議使用 **WebStorm**開啟你的專案
4128
2. 打開 .devcontainer/devcontainer.json
4229
3. 點擊編輯器中 `{` 旁邊的圖標,然後選擇「建立開發容器並掛載原始碼...」
43-
4. 按照說明操作,即可享受你的開發旅程!
30+
4. 按照提示操作
31+
32+
### 本地/Docker
33+
34+
1. 安裝 [Node.js](https://nodejs.org)
35+
2. 安裝 [MongoDB](https://www.mongodb.com/try/download/community)
36+
37+
## 如何運行
38+
39+
### 本地
40+
41+
1. 安裝相依套件。
42+
43+
```sh
44+
npm install
45+
```
46+
47+
2. 複製 .env 檔案。
48+
49+
```sh
50+
cp .env.template .env
51+
```
52+
53+
3. 根據文件描述填寫 `.env` 內的環境變數。
54+
55+
4. 啟動開發用伺服器。
56+
57+
```sh
58+
nodemon
59+
```
60+
61+
如果你不需要自動重新載入,可以改用以下指令:
62+
63+
```sh
64+
npm start
65+
```
66+
67+
### Docker
68+
69+
啟動 Docker Compose 容器。
70+
71+
```sh
72+
docker compose up -d --build
73+
```
4474

4575
## 環境變數
4676

4777
- `FRONTEND_BASE_URL` 網站的 URL,用於創建驗證鏈接
4878
- `RESERVE_MONGODB_URI` 這個 URI 用於連接到 MongoDB。
4979
- `EMAIL` 用於發送電子郵件給使用者的電子郵件地址
50-
- `EMAIL_PASSWORD` 用於登錄 `EMAIL` 中電子郵件地址的密碼
80+
- `EMAIL_PASSWORD` 用於登錄 `EMAIL` 中電子郵件地址的密碼
81+
82+
## 開發協作
83+
84+
非常歡迎!
85+
86+
更新程式時,別忘了更新文件(尤其是 API 的 JSDoc 註解)
87+
88+
## 問答
89+
90+
<details>
91+
92+
<summary>為什麼選擇 JavaScript?</summary>
93+
94+
因為 JavaScript 比較簡單(學校有教),考量後續負責維護的同學程度,所以選擇了 JavaScript 而非 TypeScript。
95+
96+
這也是為什麼我們選擇了 npm。
97+
98+
</details>

0 commit comments

Comments
 (0)