-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Artem Kharshan edited this page Dec 13, 2017
·
14 revisions
To include variables in your sass file
@import "variables";
* {
background: $grey;
}
Issue with webpack fix
RAILS_ENV=development bin/webpack
In application.yml
TOR_IP:'54.172.67.164'
To reference the tor proxy IP, use the following syntax to retrieve the RAILS_ENV environment variable:
ENV[RAILS_ENV]
Run vue webpacker in background:
bin/webpack-dev-server
actions:
-get site:
--call:
this.$store.dispatch("getSite", 1)
store:
getSite(context, id){
return axios.get(`api/sites/${id}`)
.then(res => {
console.log("gite got", res);
context.commit('ADD_SITES', res.data.sites)
context.commit('ADD_PINGS', res.data.pings)
})
.catch(e => {
console.log('failed to get ping request');
})
},
- get sites
--call:
this.$store.dispatch("getSites")
store:
getSites(context) {
console.log("getsites")
return axios.get(`api/sites`)
.then(res => {
context.commit('ADD_SITES', res.data.sites)
context.commit('ADD_PINGS', res.data.pings)
})
.catch(e => {
console.log('failed to get ping request');
})
},
- ping sites --works like getSites but this will also ping sites so it takes longer
pingSites(context){
return axios.get(`api/ping`)
.then(res => {
context.commit('ADD_SITES', res.data.sites)
context.commit('ADD_PINGS', res.data.pings)
})
.catch(e => {
console.log('failed to get ping request');
})
}