Skip to content

NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.

License

Notifications You must be signed in to change notification settings

Sn1F3rt/NervaAPI

Repository files navigation

NervaAPI

Ruff License

Table of Contents

About

NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.

Prerequisites

  • Git
  • Python >= 3.8
  • MongoDB database
  • make (optional)

Installation

  1. Install uv > https://docs.astral.sh/uv/getting-started/installation/

  2. Clone the repository

     git clone https://github.com/Sn1F3rt/NervaAPI.git
  3. Switch to the project directory

     cd NervaAPI
  4. Create a virtual environment

    uv venv # or make env
  5. Install dependencies

     uv sync --no-dev # or make install

Configuration

Copy the config.example.py file to config.py and update the variables.

Running

Development

uv run launcher.py # or make dev

The API server will be running at http://localhost:8000.

Production

source .venv/bin/activate # or make activate
hypercorn --bind 0.0.0.0:8000 launcher:app

or if you want to enable SSL support

source .venv/bin/activate # or make activate
hypercorn --certfile cert.pem --keyfile key.pem --bind 0.0.0.0:8000 launcher:app

The API server will be running at http://localhost:8000. The certificate and key files are required for SSL support.

License

GNU General Public License v3.0

Copyright © 2024 Sayan "Sn1F3rt" Bhattacharyya, The Nerva Project

About

NervaAPI is a RESTful API server for the Nerva blockchain. It provides a simple interface to interact with the Nerva blockchain using HTTP requests.

Topics

Resources

License

Stars

Watchers

Forks