Giter VIP home page Giter VIP logo

artion-api-graphql's Introduction

Artion-API-GraphQL

GraphQL API server for Fantom Artion v2 - backend for Artion-Client-V2.

Build using make:

make

Create JSON config file by doc/config.example.json example.

Requirements for run:

  • Locally running go-opera - configure IPC file in node.url in config file.
  • Local MongoDB for data scanned from chain - configure in db section of config file.
  • MongoDB shared by all Artion nodes for storing users data - shared_db section.
  • IPFS node for loading token images and token JSON metadata file - two options:
    • Local IPFS node configured in ipfs.url
    • Pinata gateway configured in ipfs.gateway
  • For uploading images into IPFS, Pinata bearer needs to be configured in ipfs.gateway_bearer (even when local IPFS node is used otherwise!)
  • For sending email notifications, Sendgrid API domain and key needs to be configured in notification.sendgrid section.

Before first start you need to initialize the MongoDB database. If you want to use other than the official contracts on mainnet, you will need to update observed.json appropriately first.

mongoimport --db=artion --collection=observed --file=doc/db/observed.json
mongoimport --db=artion --collection=status --file=doc/db/status.json

For the shared MongoDB database:

mongoimport --db=artionshared --collection=colcats --file=doc/db/colcats.json
mongoimport --db=artionshared --collection=collections --file=doc/db/collections.json

When configured, run the Artion api server:

build/artionapi -cfg my-config-file.json

For production deployment check systemd example in doc/systemd to install the api server as systemd service.

As soon as the api server is started, you can access GraphiQL testing interface at http://localhost:7373/graphi.

To connect Artion-Client-V2 update the providers list in app.config.js to use http://localhost:7373/graphql.

artion-api-graphql's People

Contributors

quan8 avatar thaarok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.