Skip to content

Commit 558d904

Browse files
authored
Merge pull request #56 from back4app/analytics-proxy
Analytics proxy
2 parents 6929246 + 6edf2cf commit 558d904

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

Parse-Dashboard/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
1919
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
2020
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
21-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
21+
})(window,document,'script','https//a.back4app.com/a.js','ga');
2222
ga('create', 'UA-66038885-1', 'auto');
2323
ga('send', 'pageview');
2424
setTimeout("ga('send','event','Profitable Engagement','time on page more than 30 seconds')",30000);

deploy-homolog.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
if [[ ! $b4a_certs_path ]]; then echo 'Set b4a_certs_path environment variable, please!' && exit; fi
4+
5+
host=34.192.186.60
6+
user=ubuntu
7+
pem=AppContainers.pem
8+
9+
branch=$(git symbolic-ref --short HEAD)
10+
git='~/bin/git-parse-dashboard'
11+
ssh -t -i $b4a_certs_path/$pem $user@$host "sudo su back4app -c '. ~/.nvm/nvm.sh && nvm use 9 && cd ~/scm/parse-dashboard && $git reset --hard && $git remote update && $git checkout $branch && $git merge origin/$branch && yarn install && npm run prepublish && npm run build'"
12+
#ssh -t aws_B4ANFS_Homolog "sudo su back4app -c '. ~/.nvm/nvm.sh && nvm use 9 && cd ~/scm/back4app-site && yarn install && npm run build && pm2 reload site'"

deploy-prod.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
if [[ ! $b4a_certs_path ]]; then echo 'Set b4a_certs_path environment variable, please!' && exit; fi
4+
5+
host=52.0.232.94
6+
user=ubuntu
7+
pem=Back4App_Production.pem
8+
9+
branch=master
10+
git='~/bin/git-parse-dashboard'
11+
ssh -t -i $b4a_certs_path/$pem $user@$host "sudo su back4app -c '. ~/.nvm/nvm.sh && nvm use 9 && cd ~/scm/parse-dashboard && $git reset --hard && $git remote update && $git checkout $branch && $git merge origin/$branch && yarn install --production=false && npm run prepublish && npm run build'"
12+
#ssh -t aws_B4ANFS_Homolog "sudo su back4app -c '. ~/.nvm/nvm.sh && nvm use 9 && cd ~/scm/back4app-site && yarn install && npm run build && pm2 reload site'"

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@
9797
"pretest": "npm run lint",
9898
"generate": "node scripts/generate.js",
9999
"prepublish": "webpack --config webpack/publish.config.js",
100-
"start": "node ./Parse-Dashboard/index.js"
100+
"start": "node ./Parse-Dashboard/index.js",
101+
"deploy-homolog": "sh deploy-homolog.sh",
102+
"deploy-prod": "sh deploy-prod.sh"
101103
},
102104
"bin": {
103105
"parse-dashboard": "./bin/parse-dashboard"

0 commit comments

Comments
 (0)