import feathers from '@feathersjs/feathers'; const app = feathers(); //Auth import auth from '@feathersjs/authentication-client'; app.configure(auth()); //import axios from 'axios'; import rest from '@feathersjs/rest-client'; const restClient = rest() //configure with connection URL base app.configure(restClient.fetch(window.fetch)); import { writable } from 'svelte/store'; app.perms = writable(false);//store currently logged in user app.perms.set(false); app.reAuthenticate()//safe to always try using a stored token on load. .then(async function(result){ app.perms.set(result.user.permissions); }) .catch(s=>'noop'); export default app;