3.53.0-alpha.1 • Published 8 months ago
member-easy-mobile-v1 v3.53.0-alpha.1
Member Easy App Mobile 網頁版
Features
Quick start
- Make sure that you have Node.js v8.10 and npm v5 or above installed.
- Clone this repo using
git clone ssh://git@ycgit.o168.net:10022/yc-frontend/190101-game-lobby-v2.git
- Move to the appropriate directory:
cd 190101-game-lobby-v2
. - Run
yarn install
in order to install dependencies and clean the git repo. - Run
cp .env.dev .env
to development environment. - At this point you can run
yarn dev
to see the example app athttp://localhost:3000
.
But special case useyarn dev --port=80
athttp://vv4a.test88b.net
Now you're ready to rumble!
Node Version Change
$ nvm use v8.16.2
if you not install nvm, please look https://medium.com/@imaginechiu/m1pro-arm-%E5%AE%89%E8%A3%9D-nvm-ac64f1f45a50
Environmental parameters
- SITE_ENV: develop 開發, production 正式
- SITE_CODE: 站台代號 (ref: src/config/site.js, ex: asiaInt)
- ROUTE_PREFIX_PATH: 路由前輟 (ex: /ezapp-mobile)
- STATIC_BASE_URL: 前端靜態資源路徑 (ex: /static)
- UPLOAD_BASE_URL: 後端靜態資源路徑 (ex: /FileUpload)
- PWA_ENABLE: 是否開啟PWA與Service Worker
- TEST_SPEED_ENABLE: 是否登入後進行測速功能
- PROXY_ENABLE: 是否開啟API接口代理
- API_URL: API Base path
Config
in src/config/site.js
- siteCode: 站台代號
- siteName: Meta Title 前面的名稱
- siteDesc: Meta Title 後面的說明
- description: Meta Desc
- country: 市場別 (malaysia|china|thailand)
- defaultLang: 預設語系 (en-US|zh-CN|th-TH|id-ID)
- blackLang: 語系白名單 (en-US|zh-CN|th-TH|id-ID)
- env: 環境參數 (sandbox|staging|production)
- theme: 主題, 圖片相關設定
Documentation
- Add Site Need Image: 新增站台需要的圖片
- API Test Doc: API溝通系統與文件
- API Error Code(Google Doc): API錯誤代碼一覽表
Create the new Site
- src/config/site.js add the config
- in static/site/{NEW_SITE_CODE} add about image
- production environmental in your nginx config add the setting
location /ezapp-mobile {
include /etc/nginx/conf.d/sites-module/proxy.conf;
add_header Cache-Control "no-cache";
rewrite ^/ezapp-mobile/(bundle|static|assets)/(.+)$ /$1/$2 break;
rewrite ^/ezapp-mobile/(sw.js)$ /$1 break;
# 愛博
if ( $host ~ "^((.+).aibo.sumi86.site|aibo.sumi86.site)" ) {
set $siteCode "aibo";
}
# 盛博
if ( $host ~ "^((.+).asiaInt.sumi86.site|asiaInt.sumi86.site)" ) {
set $siteCode "asiaInt";
}
# iBET
if ( $host ~ "^((.+).ibet.sumi86.site|ibet.sumi86.site)" ) {
set $siteCode "ibet";
}
proxy_set_header siteCode $siteCode;
proxy_pass http://ezapp-mobile-v1;
}
- Create About PWA Favicon
# set your need create site in env => SITE_CODE, then run this
$ yarn build:favicons
# done your file in static/site/{NEW_SITE_CODE}/pwa
# please delete manifest.json, because it was produced at the time of release
after please remember to compress the picture
Good luck after you finish!
Create new game lobby
- src/resources/themes/Images/GameLobby.js add the config
after please remember to compress the picture
Support Factory
3.53.0-alpha.1
8 months ago