You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const Hapi = require('hapi');
const hoodie = require('hoodie').register;
const PouchDB = require('pouchdb-core')
.plugin(require('pouchdb-find'))
.plugin(require('pouchdb-replication'))
.plugin(require('pouchdb-mapreduce'))
.plugin(require('pouchdb-adapter-fs'))
.defaults({
prefix: '.hoodie/data/'
});
const Store = require('@hoodie/store-server-api')(PouchDB)
const server = new Hapi.Server()
server.connection({
host: 'localhost',
port: 8080
});
server.register({
register: hoodie,
options: { // pass options here
inMemory: false,
public: 'dist',
PouchDB: PouchDB
}
}, function (error) {
if (error) {
throw error
}
server.start(function (error) {
if (error) {
throw error
}
console.log('Server running at:', server.info.uri);
// HERE I want to do some task with the users' stores
Store.open('userXXXYYYZZ'); // DOES NOT WORK
})
});
Everything's fine client side. I'd like to work on the databases to replicate data and do some server side tasks. I tried to open a user's store given its id but it always fails with Missing: Store does not exist. I use the fs adapter and I do see the files! Is there something I'm missing?
The text was updated successfully, but these errors were encountered:
Hi Hoodie team,
I've manually set up Hoodie with a Node script.
Everything's fine client side. I'd like to work on the databases to replicate data and do some server side tasks. I tried to open a user's store given its id but it always fails with
Missing: Store does not exist
. I use the fs adapter and I do see the files! Is there something I'm missing?The text was updated successfully, but these errors were encountered: