Skip to content

Commit

Permalink
Merge branch 'release/v0.8.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Luphia committed Jul 15, 2022
2 parents aefc4ff + 12d3d08 commit eaa5790
Show file tree
Hide file tree
Showing 212 changed files with 18,442 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
XLSFOLDER_DIR = /xls/
JSONFILE_DIR = /server/playlist.json

# google gmail api api config
GMAIL_CLIENT_SECRET = "test_client_secret"
GMAIL_CLIENT_ID = "test_client_id"
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
}
}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ typings/
.yarn-integrity

# dotenv environment variables file
# security problem
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache
Expand Down Expand Up @@ -102,3 +102,7 @@ dist

# TernJS port file
.tern-port

# dist
dist/
build/
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,50 @@
# iSunTV-Live
Live Stream of iSunTV

# Requirements
支援 node.js v 14.15.1 版本以上


# Settings
1. 下載原始檔
```
git clone https://github.com/CAFECA-IO/iSunTV-Live.git
```
2. 安裝函式庫
```
cd iSunTV-Live
npm install
```
3. 準備 google email api 的 REFRESH_TOKEN, ACCESS_TOKEN, CLIENT_SECRET, CLIENT_ID
4. 進入 .env 檔修改以下參數,並以上述的資料替代之
```shell
vi .env
```
```toml
REFRESH_TOKEN = "test_refresh_token"
ACCESS_TOKEN = "test_access_token"
CLIENT_SECRET = "test_client_secret"
CLIENT_ID = "test_client_id"
```
5. 啟動伺服器
```
npm run start
```
6. 測試
```
curl -X GET http://localhost:3000/api/v1/chinasun/programlist/
```
確認有回傳節目表 表示成功

# How to run the api?
1. 確保 [http://localhost:3000/](http://localhost:3000/) 並未被佔有
2. 執行以下的 command
```
#執行 npm run build:nest 並將其編譯到 dist 中
npm run build:nest
#執行 npm run start 來執行 node server
npm run start
```
3. 進入 [http://localhost:3000/api/v1](http://localhost:3000/api/v1) 即進入 api
4. 使用 api 的規則請詳閱 wiki
Loading

0 comments on commit eaa5790

Please sign in to comment.