Open mangreen opened 9 years ago
上傳遊戲icon及背景
HTTPS
$ git clone https://JulienChen@bitbucket.org/vm5dev/web-adplay.git 或SSH $ git clone git@bitbucket.org:vm5dev/web-adplay.git
之後
$ cp config/local-development-template.js config/local.js $ npm install $ bower install
ps. 如果是複製已經有的專案記得 git pull
port : (process.env.PORT || 3020),
port => 想要的
analytics: { host: 'a.vm5apis.com' }, mongo : { database: "analytics", user : "vm5analytics", passwd: "vm567890", options : { host: "127.0.0.1" } }
analytics => a.vm5apis.com 如果最後面畫面黑屏, 表示analytics server沒設好
vm : { ip: '211.72.250.1', port: '5000' },
ip => CHT是 211.72.250.1 跟 211.72.250.29 UCloud是 118.192.77.83 nextlink是 220.130.123.241 port => 5000
沒有nginx時要安裝 $ sudo apt-get install nginx
server{ listen 80; server_name jp1.vm5apis.com; client_max_body_size 100M; location /{ proxy_pass http://localhost:3011; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; #proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
server_name => 想要的 proxy_pass http://localhost:3011; => 想要的
getCampaignInfo的caimpan資訊
var data = { '100000': { app_id: 'jp.co.mixi.monsterstrikeTW', apk_id: 'apk-SplashActivity-monsterstrike2-7-2', campaign_id: 100000 } };
getApkInfo的api資訊
'apk-SplashActivity-monsterstrike2-7-2': { title: "monsterBall", author: "monsterBall", description: "", icon: "/img/monsterBall_icon.png", placeholder: "", background: "/img/monsterBall_backBlur.png", store_url: { android: "https://play.google.com/store/apps/details?id=jp.co.mixi.monsterstrikeTW", ios: "https://itunes.apple.com/tw/app/guai-wu-dan-zhu/id850251209?l=zh&mt=8", market: "market://details?id=jp.co.mixi.monsterstrikeTW" } },
pm2沒有時需要安裝
$ npm install pm2 -g --unsafe-perm
如果有需要執行關閉使用3000 port的服務
$ sudo kill `sudo lsof -t -i:3000`
再使用pm2啟動
$ pm2 start [新的adplay]/server.js --name [新的adplay]
或是
$ adplay [新的adplay]
沒campaign_id時
http://[server_ip]/p1?apk_id=[apk_id]&campaign_id=[campaign_id]
ex. http://adwo.vm5apis.com/p1?apk_id=apk-NewpplActivity-paopaolong
有campaign_id時
http://[server_ip]/player?apk_id=[apk_id]&campaign_id=[campaign_id]
ex. http://pixnet.vm5apis.com/player?apk_id=apk-SplashActivity-monsterstrike2-7-2&campaign_id=100100
&p=0 右下角顯示測試的page數 &audio=0 關閉聲音 &tl=[秒數] 遊玩時間 &video_codec=[參數] mjpeg: 為image base, jsmpeg: 為streaming base &lang=[參數] en: english, jp:日文, zh-tw: 繁中
https://ap-northeast-1.console.aws.amazon.com
connectAssets:{ paths: ["assets/js", "assets/css", "public"], build: true, compress: false, servePath: 'http://d2cg5ai7hth96l.cloudfront.net/assets/' },
1. 連至 Server
上傳遊戲icon及背景
2. 至bitbucket git adplay
HTTPS
之後
ps. 如果是複製已經有的專案記得 git pull
3. 修改config/local.js 中的
port => 想要的
analytics => a.vm5apis.com 如果最後面畫面黑屏, 表示analytics server沒設好
ip => CHT是 211.72.250.1 跟 211.72.250.29 UCloud是 118.192.77.83 nextlink是 220.130.123.241 port => 5000
4. 在/etc/nginx/sites-available/default新增
server_name => 想要的 proxy_pass http://localhost:3011; => 想要的
5. nginx重啟 $ sudo service nginx restart
6. 修改adplay底下 routes/index.js 中的
getCampaignInfo的caimpan資訊
getApkInfo的api資訊
7. 啟動adplay
pm2沒有時需要安裝
如果有需要執行關閉使用3000 port的服務
再使用pm2啟動
或是
8. 連結
沒campaign_id時
ex. http://adwo.vm5apis.com/p1?apk_id=apk-NewpplActivity-paopaolong
有campaign_id時
ex. http://pixnet.vm5apis.com/player?apk_id=apk-SplashActivity-monsterstrike2-7-2&campaign_id=100100
&p=0 右下角顯示測試的page數 &audio=0 關閉聲音 &tl=[秒數] 遊玩時間 &video_codec=[參數] mjpeg: 為image base, jsmpeg: 為streaming base &lang=[參數] en: english, jp:日文, zh-tw: 繁中
9. 上CDN
https://ap-northeast-1.console.aws.amazon.com