Member Easy App Mobile 網頁版
Start your next react project in seconds
A highly scalable, offline-first foundation with the best DX and a focus on performance and best practices
First Template is react-boilerplate and ignite
After integrate by Imagine10255 and maintained with ❤️ by an igroup team of developers.
After integrate by Imagine10255 and maintained with ❤️ by an igroup team of developers.
Features
- Quick scaffolding
- Create components, containers, routes, selectors and sagas - and their tests - right from the CLI!
- Instant feedback
- Enjoy the best DX (Developer eXperience) and code your app at the speed of thought! Your saved changes to the CSS and JS are reflected instantaneously without refreshing the page. Preserve application state even when you update something in the underlying code!
- Predictable state management
- Unidirectional data flow allows for change logging and time travel debugging.
- Next generation JavaScript
- Use template strings, object destructuring, arrow functions, JSX syntax and more.
- Next generation CSS
- Write composable CSS that's co-located with your components for complete modularity. Unique generated class names keep the specificity low while eliminating style clashes. Ship only the styles that are on the page for the best performance.
- Industry-standard routing
- It's natural to want to add pages (e.g. `/about`) to your application, and routing makes this possible.
- Industry-standard i18n internationalization support
- Scalable apps need to support multiple languages, easily add and support multiple languages with `react-intl`.
- Offline-first
- The next frontier in performant web apps: availability without a network connection from the instant your users load the app.
- Static code analysis
- Focus on writing new features without worrying about formatting or code quality. With the right editor setup, your code will automatically be formatted and linted as you work.
- SEO
- We support SEO (document head tags management) for search engines that support indexing of JavaScript content. (eg. Google)
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