2.11.1 • Published 8 months ago

@arkejs/client v2.11.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@arkejs/client

License

An isomorphic JavaScript client for Arke backend connection

Usage

First of all, you need to install the library:

npm install @arkejs/client
pnpm install @arkejs/client

Then you're able to import the library and establish the connection with the database:

import Client from '@arkejs/client'

// Create a single arke js for interacting with your server
const client = new Client({ 
    serverUrl: 'http://localhost:4000',
    project: 'PROJECT_NAME',
})

client.arke.get('my_arke').then(
  res => console.log(res.data),
  err => console.error(err.response.data)
)

When you initialize the client you can define custom methods to get the Auth session:

const client = new Client({
    serverUrl: 'http://localhost:4000',
    project: 'PROJECT_NAME',
    getSession: async () => {
      const session = await AsyncStorage.getItem('@session');
      return session;
    },
    setSession: async session => {
      await AsyncStorage.setItem('@session', JSON.stringify(session.content));
    },
  });
2.11.1

8 months ago

2.11.0

1 year ago

2.10.1

1 year ago

2.10.0

1 year ago

2.9.6

1 year ago

2.9.5

1 year ago

2.8.1

1 year ago

2.9.2

1 year ago

2.9.4

1 year ago

2.9.3

1 year ago

2.9.1

2 years ago

2.9.0

2 years ago

2.8.0

2 years ago

2.7.0

2 years ago

2.6.2

2 years ago

2.5.0

2 years ago

2.4.1

2 years ago

2.6.1

2 years ago

2.6.0

2 years ago

2.3.0

2 years ago

2.4.0

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.3

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago