Skip to main content

NEAR API REST Server

NEAR REST API Server is a project that allows you create your own simple REST API server that interacts with the NEAR blockchain.


Requirements


Setup

  1. Clone repository
git clone git@github.com:near-examples/near-api-server.git
  1. Install dependencies
npm install
  1. Configure near-api-server.config.json

Default settings:

{
"server_host": "localhost",
"server_port": 3000,
"rpc_node": "https://rpc.testnet.near.org",
"allow_rpc_update": false
}

Note: allow_rpc_update determines if this param can be changed via /init route.

  1. Start server
node app

Faker data

Use the following tags below to use random data for testing purposes.

  • {username}
  • {number}
  • {word}
  • {words}
  • {image}
  • {color}