DigiByte-Core / DigiAssets-Metadata-Server

REST API server for fetching and sharing DigiAssets transactions metadata
http://DigiAssets.net
0 stars 2 forks source link

DigiAssets Metadata Server

REST API server for fetching and sharing DigiAssets transactions metadata. To learn how this repo fits into the DigiAssets stack please read the API docs & wiki.

Getting Started

Installation

$ npm i -g digiasset-metadata-server

Run

Currently, the server uses AWS S3 storage service as a caching layer. So, in order to use the server one needs to set the environment variables:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_S3_BUCKET

Then, you can run the DigiAssets metadata server with the following options:

$ digiasset-metadata-server [options]

  Options:

    -h, --help                                         output usage information
    -V, --version                                      output the version number
    -p, --port <port>                                  Port to listen on

Or just run it with the defaults using:

$ digiasset-metadata-server

API

GET /getMetadata

POST /addMetadata

GET /shareMetadata

Note: this call should be preceded by a call to POST /addMetadata

Configuration

Default configuration per environment (NODE_ENV value) can be found in the config directory. You can use custom properties by adding properties.conf to that folder.

Development

  1. Fork this repo
  2. npm install
  3. use the Standard coding style when hacking the code - https://github.com/feross/standard
  4. Send us a pull request

Hosted Server

DigiAssets maintains a hosted version of this server at:
https://DigiAssets.net

License

Apache-2.0