0.0.22 • Published 3 years ago

hexabase-sdk v0.0.22

Weekly downloads
289
License
MIT
Repository
github
Last release
3 years ago

install

npm install hexabase-sdk

Sample

node.js

const { Hexabase, HexabaseSdkOptions, HexabaseSdkError } = require('hexabase-sdk');

const options = {
  host: 'localhost',
  port: 7575,
  path: '/api/v0'
};
const hexa = new Hexabase(options);
hexa.login('hexauser1@example.com', 'password').then((res) => {
  console.info(`token:${res}`);
}).catch((e) => {
  if (e instanceof HexabaseSdkError) {
    console.error(`hexabase sdk error:${e}`);
  } else {
    console.error(`error:${e}`);
  }
})

vue.js

import { Hexabase } from 'hexabase-sdk'
const options = {
  path: '/linker-api/api/v0'
}
const hexa = new Hexabase(options)
hexa.login('hexauser1@example.com', 'password').then((res) => {
  console.info(`token:${res}`)
}).catch((e) => {
  if (e instanceof HexabaseSdkError) {
    console.error(`hexabase sdk error:${e}`)
  } else {
    console.error(`error:${e}`)
  }
})

set proxy

module.exports = {
  dev: {
    proxyTable: {
      "/linker-api/": {
        target: "http://localhost:7575",
        pathRewrite: {
          "^/linker-api": ""
        },
        logLevel: "debug"
      }
    }
  }
}
0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.14

3 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago