NEAR REST API Server is a project that allows you create your own simple REST API server that interacts with the NEAR blockchain.
Requirements
- NEAR Account (with access to private key or seed phrase)
- Node.js
- npm or Yarn
- API request tool such as Postman
Setup
- Clone repository
git clone [email protected]:near-examples/near-api-server.git
- Install dependencies
npm install
- 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._
- Start server
node app
Faker data
Use the following tags below to use random data for testing purposes.
{username}
{number}
{word}
{words}
{image}
{color}
Generate comment with AI 2 nL