Skip to content
Snippets Groups Projects
Commit 35504e85 authored by Adam Procter's avatar Adam Procter
Browse files

Merge branch 'serversettingsjson'

parents 88a30818 93b28b3f
No related branches found
No related tags found
No related merge requests found
.DS_Store .DS_Store
node_modules node_modules
/dist /dist
/assets/settings.json /src/assets/settings.json
# local env files # local env files
.env
.env.local .env.local
.env.*.local .env.*.local
......
{
"settings": [
{
"name": "nogg",
"password": "N/9d^9cn23",
"url": "@nn.adamprocter.co.uk/"
}
]
}
...@@ -4,7 +4,7 @@ import PouchDB from 'pouchdb' ...@@ -4,7 +4,7 @@ import PouchDB from 'pouchdb'
PouchDB.plugin(require('pouchdb-find')) PouchDB.plugin(require('pouchdb-find'))
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import accounts from '../assets/settings.json' //import accounts from '../assets/settings.json'
// PouchDB.debug.enable('*') // PouchDB.debug.enable('*')
Vue.use(Vuex) Vue.use(Vuex)
...@@ -24,14 +24,16 @@ if (localStorage.getItem('myNNClient') == null) { ...@@ -24,14 +24,16 @@ if (localStorage.getItem('myNNClient') == null) {
} }
var pouchdb = new PouchDB(microcosm) var pouchdb = new PouchDB(microcosm)
var remote = // var remote =
'https://' + // 'https://' +
accounts.settings[0].name + // accounts.settings[0].name +
':' + // ':' +
accounts.settings[0].password + // accounts.settings[0].password +
'@nn.adamprocter.co.uk/' + // accounts.settings[0].url +
microcosm + // microcosm +
'/' // '/'
var remote = 'http://127.0.0.1:5984/localcouch'
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
...@@ -80,14 +82,15 @@ const store = new Vuex.Store({ ...@@ -80,14 +82,15 @@ const store = new Vuex.Store({
// console.log(doc) // console.log(doc)
microcosm = doc microcosm = doc
pouchdb = new PouchDB(microcosm) pouchdb = new PouchDB(microcosm)
remote = // remote =
'https://' + // 'https://' +
accounts.settings[0].name + // accounts.settings[0].name +
':' + // ':' +
accounts.settings[0].password + // accounts.settings[0].password +
'@nn.adamprocter.co.uk/' + // accounts.settings[0].url +
microcosm + // microcosm +
'/' // '/'
remote = 'http://127.0.0.1:5984/localcouch'
store.dispatch('syncDB') store.dispatch('syncDB')
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment