![logo](https://www.xy.company/img/home/logo_xy.png)
XYO API (api-xyo-nodejs)
Branches
Master
![Greenkeeper badge](https://badges.greenkeeper.io/XYOracleNetwork/api-xyo-nodejs.svg)
Develop
![BCH compliance](https://bettercodehub.com/edge/badge/XYOracleNetwork/api-xyo-nodejs?branch=develop&token=75e0ed2470ac349132bdaefb1fd64991cbd85d23)
Description
The main API for accessing XYO network information using GraphQL.
User Mode
Requirements (Step 1)
Install Node 10.x or later from: NodeJs
Install Diviner (Step 2)
sudo npm install @xyo-network/api-xyo-nodejs -g --unsafe-perm=true
Build Diviner (Step 3)
xyo-api start
Developer Mode
Requirements (Step 1)
Install Node 10.x or later from: NodeJs
Install Diviner (Step 2)
npm install https://github.com/XYOracleNetwork/api-xyo-nodejs
Build Diviner (Step 3)
npm run build
Start Diviner (Step 4)
npm run start
Docker
Install
Install the Xyo Api in a Docker and start the server at the end.
Note: There currently are quite a few build errors/warnings generted from dependencies that can safely be ignored, but should addressed in the future.
docker image build -t xyonetwork-api-xyo-nodejs-install:latest https://raw.githubusercontent.com/XYOracleNetwork/api-xyo-nodejs/master/docker/install/Dockerfile
docker run -p 12001:12001 xyonetwork-api-xyo-nodejs-install:latest
Command Line
Usage
xyo-api <cmd> [opt]
<cmd>: commands
[opt]: options
Commands
start Start the Api Server
Options
-g, --graphql [n] The http port to listen on for graphql connections
(default = 12001)
-d, --diviner [s] The url of the seed diviner to contact
(default = http://diviners.xyo.network:12002)
Example: Start the API on port 9090 and use port 9099 on your local computer for the diviner
xyo-api start -g 9090 -d http://localhost:9099
License
Only for internal XY Company use at this time
Credits
Made with ❤️
by XYO