0.0.22 • Published 4 years ago

hexabase-sdk v0.0.22

Weekly downloads
289
License
MIT
Repository
github
Last release
4 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

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.14

4 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago