Add Primus socket connection mixin for client

parent 3760120d
/* global Primus */
import feathers from '@feathersjs/feathers'
import primus from '@feathersjs/primus-client'
import Vue from 'vue'
export default {
mounted () {
// TODO: Make the URL generic/configurable. This will
// currently only work on dev.
const socket = new Primus('http://localhost:3030')
Vue.app = feathers()
Vue.app.configure(primus(socket))
}
}
......@@ -13,6 +13,10 @@ module.exports = {
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1, viewport-fit=cover' }
],
title: 'Indie Site',
script: [
{src: 'primus/primus.js'}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment