dev-production

This commit is contained in:
Alberto Xamin 2020-11-21 19:55:52 +01:00
parent d82a339c23
commit 4fb80154da
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 8 additions and 5 deletions

View File

@ -37,6 +37,7 @@
</template> </template>
<script> <script>
import Vue from 'vue'
import Card from './components/Card.vue' import Card from './components/Card.vue'
import Lobby from './components/Lobby.vue' import Lobby from './components/Lobby.vue'
@ -70,10 +71,12 @@ export default {
sockets: { sockets: {
connect() { connect() {
this.isConnected = true; this.isConnected = true;
if (Vue.config.devtools) {
setTimeout(function(){ setTimeout(function(){
this.username =(1+Math.random() * 100 % 100).toFixed(2).toString(); this.username = (1+Math.random() * 100 % 100).toFixed(2).toString();
this.setUsername(); this.setUsername();
}.bind(this), 1000) }.bind(this), 1000)
}
}, },
disconnect() { disconnect() {
this.isConnected = false; this.isConnected = false;

View File

@ -5,7 +5,7 @@ Vue.config.productionTip = false
import VueSocketIO from 'vue-socket.io' import VueSocketIO from 'vue-socket.io'
Vue.use(new VueSocketIO({ Vue.use(new VueSocketIO({
debug: true, debug: true,
connection: 'http://localhost:5001', connection: Vue.config.devtools?'http://localhost:5001':'http://51.15.199.193:5001',
})) }))
new Vue({ new Vue({